C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
JavaScript Math sinh() methodThe JavaScript math sinh() method returns the hyperbolic sine of the given number. SyntaxThe sinh() method is represented by the following syntax: Math.sinh(num) Parameternum - A number. ReturnThe hyperbolic sine of a number. JavaScript Math sinh() method exampleHere, we will understand sinh() method through various examples. Example 1Let's see a simple example of sinh() method. <script> document.writeln(Math.sinh(-1)+"<br>"); document.writeln(Math.sinh(0)+"<br>"); document.writeln(Math.sinh(0.5)+"<br>"); document.writeln(Math.sinh(2)); </script> Output: -1.1752011936438014 0 0.5210953054937474 3.626860407847019 Example 2Here, you can test sinh() method with your own test cases. <script> function display() { var x=document.getElementById("num").value; document.getElementById("result").innerHTML=Math.sinh(x); } </script> <form> Enter a number: <input type="text" id="num"> <input type="button" onclick="display()" value="submit"> </form> <p><span id="result"></span></p>
Next TopicJavaScript Math
|