Comment in JAVASCRIPT
Singleline Comment
// ==> Single line Comment
Multiline Comment
/* ==> Multiline Comment */
Event in JAVASCRIPT
Event Name
onchange();
onclick();
onmouseover();
onmouseout();
onkeydown();
onload();
Maths function in JAVASCRIPT
Maths function
Math.round(x) Returns x rounded to its nearest integer -14.51=-15 OR -14.49=-14 OR 14.51=15
Math.ceil(x) Returns x rounded up to its nearest integer
Math.floor(x) Returns x rounded down to its nearest integer
Math.trunc(x) Remove decimal part -14.4=-14
Math.abs(x) Returns the absolute (positive) value of x: -14.4=14.4
Math.random() Returns a random number between 0 (inclusive), and 1 (exclusive):
to getrandom no. between 1 & 100000 Math.random(Math.random()x1000000)
to getrandom no. between 1 & 100000 Math.floor(Math.random()x1000000)
Comparison Operator in JAVASCRIPT
Comparison Operator
Given that x = 5
Operator Description Comparing
== equal to x == 8 (False)
x == 5 (True)
x == "5" (True)
=== equal to & equal type x === 5 (True)
x === "5" (False)
Last Update: July 18, 2026
Total 0 Votes:
0
0

