Base 8 number literal syntax
0o10 === 8 && 0O10 === 8
Base 2 number literal syntax
0b10 === 2 && 0B10 === 2
Returns false for Infinity and NaN, true otherwise
Number.isFinite(Infinity) === false
Number.isFinite(-Infinity) === false
Number.isFinite(NaN) === false
Number.isFinite(1) === true
Returns true if the input is an integer, false otherwise.
Number.isInteger(Infinity) === false
Number.isInteger(-Infinity) === false
Number.isInteger(NaN) === false
Number.isInteger(1.1) === false
Number.isInteger(1) === true
Number.isInteger(0) === true
Returns true for integers between -253 and 253, false for other values.
Number.isSafeInteger(-Math.pow(2, 53)) === false
Number.isSafeInteger(-Math.pow(2, 53) + 1) === true
Number.isSafeInteger(Math.pow(2, 53)) === false
Number.isSafeInteger(Math.pow(2, 53) - 1) === true
Returns true for NaN, false otherwise.
Number.isNaN(NaN) === true
Number.isNaN(0) === false
The value 2-52. Very loosely, the smallest difference that can be represented as a Number.
Number.EPSILON === Math.pow(2, -52) === 2.220446049250313e-16
0.1 + 0.2 !== 0.3
0.1 + 0.2 - 0.3 === 5.551115123125783e-17
0.1 + 0.2 - 0.3 < Number.EPSILON
The number -253-1 or -9007199254740991
The number 253-1 or 9007199254740991
A new type of string literal allowing:
var name = 'bob'; `my name is ${name}` === 'my name is bob'
`Here is a Multi-line string`
Allows all Unicode characters to be represented by a single code point value.
'\u{1D306}' === '\uD834\uDF06'
Returns a string composed of the code point arguments.
String.fromCodePoint(55, 78) === '7N'
A built in template string tag. Returns a string with all escape sequences rendered literally.
String.raw`A\nB` !== 'A\nB'
Returns the UTF-16 encoded code point value at the given index of the receiving string.
String.fromCodePoint('01234'.codePointAt(3)) === '3'
Returns the "Unicode Normalization Form" of the receiving string, according to the specified form.
'\u1E9B\u0323'.normalize('NFKC') !== '\u1E9B\u0323'.normalize('NFD')
Returns a new string formed by concatenating the receiving string with it self the specified number of times.
'abc'.repeat(4) === 'abcabcabcabc'
Returns true if the receiving string begins with the passed string, false otherwise.
'abcdefg'.startsWith('abc') === true
' abcdefg'.startsWith('abc') === false
'abcdefg'.startsWith('') === true
Returns true if the receiving string ends with the passed string, false otherwise.
'abcdefg'.endsWith('efg') === true
'abcdefg '.endsWith('efg') === false
'abcdefg'.endsWith('') === true
Returns true if the receiving string has a substring matching the passed string, beginning at the passed index; false otherwise.
'abcdefg'.includes('efg') === true
'abcdefg'.includes('abc', 4) === false
'abcdefg'.includes('') === true
Returns a new Symbol with the passed string label. The label is not unique.
Symbol('abc') !== Symbol('abc')
var prop = Symbol(), obj = {}; obj[prop] = 'My value'; obj[prop] === 'My value' obj[Symbol()] === undefined
Returns the shared symbol from the global symbol registry for the provided string.
Symbol.for('abc') === Symbol.for('abc')
Returns the string key for the passed symbol in the global symbol registry.
Symbol.keyFor(Symbol.for('abc')) === 'abc'
Customizes instanceof operator.
Customizes Array.prototype.concat.
Customizes for...of loops.
Reference to an object's constructor function.
Customizes internal ToPrimitive operation.
Customizes object's stringification.
Customizes with operator.