Math.tan

tan — Returns the tangent of a number.

Description

Math.tan(number number)

Parameters

Name Description Type Default Optional
number number No

Examples

Example #1 – tan example
console.log(Math.tan(4)); // 1.1578212823495777 console.log(Math.tan(0)); // 0 console.log(Math.tan(-3)); // 0.1425465430742778 console.log(Math.tan('2')); // -2.185039863261519

External references