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:

Math.sinh(number);

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>
<html>
<head>
    <title> JavaScriptSINHFunction </title>
</head>
<body>
  <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>
  <script>
    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);
  </script>
</body>
</html>
JavaScript SINH Function Example

About Suresh

Suresh is the founder of TutorialGateway and a freelance software developer. He specialized in Designing and Developing Windows and Web applications. The experience he gained in Programming and BI integration, and reporting tools translates into this blog. You can find him on Facebook or Twitter.