Tin mới
JavaScript: Scripting language
Web APIs: Programming interfaces
Structuring content with HTML module
Dynamic scripting with JavaScript module
The initial value of the [Symbol.toStringTag] property is the string "Math". This property is used in Object.prototype.toString().
The initial value of the [Symbol.toStringTag] property is the string "Math". This property is used in Object.prototype.toString().

Calculating the height of an equilateral triangle
If we want to calculate the height of an equilateral triangle, and we know its side length is 100, we can use the formulae length of the adjacent multiplied by the tangent of the angle is equal to the opposite.
Returning a random integer between two bounds
This can be achieved with a combination of Math.random() and Math.floor():
Returning a random integer between two bounds
This can be achieved with a combination of Math.random() and Math.floor():
This page was last modified on Jul 10, 2025 by MDN contributors.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.