Global : Object
Global Properties
The global this
value. See also Window.globalThis and WorkerGlobalScope.globalThis.
Example:
RunResults:
Global Methods
Returns an encoded version of component
that is suitable as a uri parameter, such as a query string.
Example:
RunResults:
Returns true
if x
is not NaN
, +Infinity
, or -Infinity
. If x
is not a Number, it is first converted to a Number before checking if it is finite. Use Number.isFinite(x)
to prevent any conversion from happening.
Example:
RunResults:
Returns true
if x
is NaN
. NaN
is never equal to another Number
, even if it is NaN
, so you must use isNaN
to check for NaN
. If x
is not a Number, it is first converted to a Number before checking if it is NaN. Use Number.isNaN(x)
to prevent any conversion from happening. See also Object.is().
Example:
RunResults:
Converts str
into a floating point number. parseFloat
is less scrict than using Number(str)
(or +str
) to convert to a Number because it ignores extra characters after the numeric portion of the string. If the first character is not a valid number, parseFloat
will return NaN
. See also parseInt and Number.parseFloat.
Example:
RunResults:
Converts str
into an integral number. If base
is not specified, parseInt
will attempt to determine the base to use depending on the input ('0x'
prefix is base 16). parseInt
is less scrict than using Number(str)
(or +str
) to convert to a Number because it ignores extra characters after the numeric portion of the string. If the first character is not a valid number in the specified base
, parseInt
will return NaN
. See also parseFloat and Number.parseInt.