JS Built-ins
← Math190 / 215
Mathsinbeginner

Math.sin() β€” Return Type

πŸ“– Usage Example
// Sine of an angle in radians
Math.sin(0)            // β†’ 0
Math.sin(Math.PI / 2)  // β†’ 1

Use Math.sin() to compute the sine of an angle in radians for trigonometry and wave simulations.

Math.sin()

Returns the sine of a number (in radians).

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

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