HTML and CSS Reference
In-Depth Information
> t
"Hello world"
When we appended “test” to the string held against the variable s , the underlying string was
not modified; instead a new string was created and assigned to the variable s . Since t still
refers to the original string, it is not impacted by the modification.
The number type is used to represent both integer and floating-point values; in fact all num-
bers are 64 bit floating-point numbers in JavaScript:
> n = 6.827
> typeof n
> n2 = 6
> typeof n2
Due to the fact that all numbers are floating-point, operations between two integers can re-
turn floating-point results (unlike in Java).
> 1/3
In addition to real numbers, JavaScript also supports a number of special values.
Search WWH ::

Custom Search