JS Built-ins
← Math204 / 215
Mathtanbeginner

Math.tan() β€” Return Type

πŸ“– Usage Example
// Tangent of an angle in radians
Math.tan(0)            // β†’ 0
Math.tan(Math.PI / 4)  // β†’ 1

Use Math.tan() to compute the tangent of an angle in radians for trigonometry and slope calculations.

Math.tan()

Returns the tangent of a number (in radians).

Challenge: Confirm that Math.tan() always returns a JavaScript number.

πŸ’‘ Hints (1)
  • β€’ Math.tan always returns a number primitive