HTML and CSS Reference
In-Depth Information
JavaScript also natively supports a Math library modelled almost identically on the Java
equivalent. Most common maths functions are available in this library.
> Math.pow(3, 2)
9
> Math.round(3.22)
3
Booleans
JavaScript supports a boolean type that contains the literal values true and false :
> t = true
true
> typeof t
"boolean"
> f = false
false
Equality operators in JavaScript (>, <, ==, !=, >=, <=) also return booleans as their result:
> f != t
true
Null
Null is a data type that has a single value: null .
Search WWH ::




Custom Search