JavaScript sinh

The JavaScript sinh function is a Math function that is used to calculate the trigonometry hyperbolic Sine for the specified expression. The syntax of the sinh Function is:


We can achieve the same result using the exp function.

(Math.exp(number) - Math.exp(- number)) / 2

JavaScript sinh Example

In this example, We find the hyperbolic Sine values for different data types and display the output.

HINT: Use EXP Function in JavaScript to deliver the same sinh result.

<!DOCTYPE html>
    <title> JavaScriptSINHFunction </title>
  <h1> JavaScriptSINHFunction </h1>
  <p id = "Pos"></p>
  <p id = "Neg"></p>
  <p id = "Dec"></p>
  <p id = "Neg_Dec"></p>
  <p id = "Str"></p>
  <p id = "Exp"></p>
  <p id = "Null"></p>
  <p id = "Multi"></p>
    document.getElementById("Pos").innerHTML = Math.sinh(1);
    document.getElementById("Neg").innerHTML = Math.sinh(-2);
    document.getElementById("Dec").innerHTML = Math.sinh(4.45);
    document.getElementById("Neg_Dec").innerHTML = Math.sinh(-2.75);
    document.getElementById("Str").innerHTML = Math.sinh("JavaScript");
    document.getElementById("Null").innerHTML = Math.sinh(null);
    document.getElementById("Multi").innerHTML = Math.sinh(2 + 9 - 7);
JavaScript SINH Function Example