Javascript browser support
ECMA-262 Specification
version
version | Release Date |
---|---|
ES1 | 1997 |
ES3 | 1999 |
ES5 | 2009 |
5.1 | June 2011 |
ES6 | June 2015 |
ES7 | June 2016 |
ES8 | June 2017 |
ES9 | June 2018 |
ES10 | June 2019 |
ES11 | June 2020 |
ES12 | June 2021 |
NodeJS ES20215 support
Array
Name | Chrome | Edge | Firefox | Safari | IE | desc |
---|---|---|---|---|---|---|
at() | v66, Jul 2021 | v79, Jul 2021 | v61, Jul 2021 | v12, Mar 2022 | returns an indexed element from an array, same as [] |
|
concat() |
ES1 | ES1 | ES1 | ES1 | ES1 | Joins arrays and returns an array with the joined arrays |
constructor |
ES1 | ES1 | ES1 | ES1 | ES1 | Returns the function that created the Array object's prototype |
copyWithin() | ES6 | ES6 | ES6 | ES6 | Copies array elements within the array, to and from specified positions | |
entries() | ES6 | ES6 | ES6 | ES6 | Returns a key/value pair Array Iteration Object | |
every() | ES5 | ES5 | ES5 | ES5 | 9-11 | Checks if every element in an array pass a test |
fill() | ES6 | ES6 | ES6 | ES6 | Fill the elements in an array with a static value | |
filter() | ES5 | ES5 | ES5 | ES5 | 9-11 | Creates a new array with every element in an array that pass a test |
find() | ES6 | ES6 | ES6 | ES6 | Returns the value of the first element in an array that pass a test | |
findIndex() | ES6 | ES6 | ES6 | ES6 | Returns the index of the first element in an array that pass a test | |
falt() | v69, Sep 2018 | v79, Jan 2020 | v62, Sep 2018 | v12, Sep 2018 | concatenates sub-array elements | |
flatMap() | v69, Sep 2018 | v79, Jan 2020 | v62, Sep 2018 | v12, Sep 2018 | first maps all elements of an array and then creates a new array by flattening the array | |
forEach() | ES5 | ES5 | ES5 | ES5 | 9-11 | Calls a function for each array element |
from() | ES6 | ES6 | ES6 | ES6 | Creates an array from an object | |
includes() | ES7 | ES7 | ES7 | ES7 | Check if an array contains the specified element | |
indexOf() | ES5 | ES5 | ES5 | ES5 | 9-11 | Search the array for an element and returns its position |
isArray() | ES5 | ES5 | ES5 | ES5 | 9-11 | Checks whether an object is an array |
join() |
ES1 | ES1 | ES1 | ES1 | ES1 | Joins all elements of an array into a string |
keys() | ES6 | ES6 | ES6 | ES6 | Returns a Array Iteration Object, containing the keys of the original array | |
lastIndexOf() | ES5 | ES5 | ES5 | ES5 | 9-11 | Search the array for an element, starting at the end, and returns its position |
length |
ES1 | ES1 | ES1 | ES1 | ES1 | Sets or returns the number of elements in an array |
map() | ES5 | ES5 | ES5 | ES5 | 9-11 | Creates a new array with the result of calling a function for each array element |
pop() |
ES1 | ES1 | ES1 | ES1 | ES1 | Removes the last element of an array, and returns that element |
prototype |
ES1 | ES1 | ES1 | ES1 | ES1 | Allows you to add properties and methods to an Array object |
push() |
ES1 | ES1 | ES1 | ES1 | ES1 | Adds new elements to the end of an array, and returns the new length |
reduce() | ES5 | ES5 | ES5 | ES5 | 9-11 | Reduce the values of an array to a single value (going left-to-right) |
reduceRight() | ES5 | ES5 | ES5 | ES5 | 9-11 | Reduce the values of an array to a single value (going right-to-left) |
reverse() |
ES1 | ES1 | ES1 | ES1 | ES1 | Reverses the order of the elements in an array |
shift() |
ES1 | ES1 | ES1 | ES1 | ES1 | Removes the first element of an array, and returns that element |
slice() |
ES1 | ES1 | ES1 | ES1 | ES1 | Selects a part of an array, and returns the new array |
some() | ES3 | ES3 | ES3 | ES3 | ES3 | Checks if any of the elements in an array pass a test |
sort() |
ES1 | ES1 | ES1 | ES1 | ES1 | Sorts the elements of an array |
splice() |
ES1 | ES1 | ES1 | ES1 | ES1 | Adds/Removes elements from an array |
toString() |
ES1 | ES1 | ES1 | ES1 | ES1 | Converts an array to a string, and returns the result |
unshift() |
ES1 | ES1 | ES1 | ES1 | ES1 | Adds new elements to the beginning of an array, and returns the new length |
valueOf() |
ES1 | ES1 | ES1 | ES1 | ES1 | Returns the primitive value of an array |
Class
Name | Chrome | Edge | Firefox | Safari | IE | desc |
---|---|---|---|---|---|---|
constructor() | ES6 | ES6 | ES6 | ES6 | Fill the elements in an array with a static value | |
extends() | ES6 | ES6 | ES6 | ES6 | create a child class of another class (parent) | |
static() | ES6 | ES6 | ES6 | ES6 | defines static methods for classes | |
super() | ES6 | ES6 | ES6 | ES6 | is used to call the constructor of its parent class to access the parent's properties and methods |
Date
Name | Chrome | Edge | Firefox | Safari | IE | desc |
---|---|---|---|---|---|---|
constructor |
ES1 | ES1 | ES1 | ES1 | ES1 | Returns the function that created the Date object's prototype |
getDate() |
Returns the day of the month (from 1-31) | |||||
getDay() |
Returns the day of the week (from 0-6) | |||||
getFullYear() |
Returns the year (1000 and 9999) | |||||
getHours() |
Returns the hour (from 0-23) | |||||
getMilliseconds() |
Returns the milliseconds (from 0-999) | |||||
getMinutes() |
Returns the minutes (from 0-59) | |||||
getMonth() |
Returns the month (from 0-11) | |||||
getSeconds() |
Returns the seconds (from 0-59) | |||||
getTime() |
Returns the number of milliseconds since midnight Jan 1 1970, and a specified date | |||||
getTimezoneOffset() |
Returns the time difference between UTC time and local time, in minutes | |||||
getUTCDate() |
Returns the day of the month, according to universal time (from 1-31) | |||||
getUTCDay() |
Returns the day of the week, according to universal time (from 0-6, Sun = 0) | |||||
getUTCFullYear() |
Returns the year, according to universal time | |||||
getUTCHours() |
Returns the hour, according to universal time (from 0-23) | |||||
getUTCMilliseconds() |
Returns the milliseconds, according to universal time (from 0-999) | |||||
getUTCMinutes() |
Returns the minutes, according to universal time (from 0-59) | |||||
getUTCMonth() |
Returns the month, according to universal time (from 0-11) | |||||
getUTCSeconds() |
Returns the seconds, according to universal time (from 0-59) | |||||
Deprecated. Use the getFullYear() method instead | ||||||
now() | ES5 | ES5 | ES5 | ES5 | 9-11 | Returns the number of milliseconds since midnight Jan 1, 1970 |
parse() |
Parses a date string and returns the number of milliseconds since January 1, 1970 | |||||
prototype |
Allows you to add properties and methods to an object | |||||
setDate() |
Sets the day of the month of a date object | |||||
setFullYear() |
Sets the year of a date object | |||||
setHours() |
Sets the hour of a date object | |||||
setMilliseconds() |
Sets the milliseconds of a date object | |||||
setMinutes() |
Set the minutes of a date object | |||||
setMonth() |
Sets the month of a date object | |||||
setSeconds() |
Sets the seconds of a date object | |||||
setTime() |
Sets a date to a specified number of milliseconds after/before January 1, 1970 | |||||
setUTCDate() |
Sets the day of the month of a date object, according to universal time | |||||
setUTCFullYear() |
Sets the year of a date object, according to universal time | |||||
setUTCHours() |
Sets the hour of a date object, according to universal time | |||||
setUTCMilliseconds() |
Sets the milliseconds of a date object, according to universal time | |||||
setUTCMinutes() |
Set the minutes of a date object, according to universal time | |||||
setUTCMonth() |
Sets the month of a date object, according to universal time | |||||
setUTCSeconds() |
Set the seconds of a date object, according to universal time | |||||
Deprecated. Use the setFullYear() method instead | ||||||
toDateString() |
Converts the date portion of a Date object into a readable string | |||||
Deprecated. Use the toUTCString() method instead | ||||||
toISOString() | ES5 | ES5 | ES5 | ES5 | 9-11 | Returns the date as a string, using the ISO standard |
toJSON() | ES5 | ES5 | ES5 | ES5 | 9-11 | Returns the date as a string, formatted as a JSON date |
toLocaleDateString() |
Returns the date portion of a Date object as a string, using locale conventions | |||||
toLocaleTimeString() |
Returns the time portion of a Date object as a string, using locale conventions | |||||
toLocaleString() |
Converts a Date object to a string, using locale conventions | |||||
toString() |
Converts a Date object to a string | |||||
toTimeString() |
Converts the time portion of a Date object to a string | |||||
toUTCString() |
Converts a Date object to a string, according to universal time | |||||
UTC() |
Returns the number of milliseconds in a date since midnight of January 1, 1970, according to UTC time | |||||
valueOf() |
Returns the primitive value of a Date object |
Global
Name | Chrome | Edge | Firefox | Safari | IE | desc |
---|---|---|---|---|---|---|
decodeURI() |
ES1 | ES1 | ES1 | ES1 | ES1 | Decodes a URI |
decodeURIComponent() |
Decodes a URI component | |||||
encodeURI() |
Encodes a URI | |||||
encodeURIComponent() |
Encodes a URI component | |||||
Deprecated. Use instead: encodeURI() encodeURIComponent() |
||||||
eval() |
Evaluates a string and executes it as if it was script code | |||||
Infinity |
A numeric value that represents positive/negative infinity | |||||
isFinite() |
Determines whether a value is a finite, legal number | |||||
isNaN() |
Determines whether a value is an illegal number | |||||
NaN |
"Not-a-Number" value | |||||
Number() |
Converts an object's value to a number | |||||
parseFloat() |
Parses a string and returns a floating point number | |||||
parseInt() |
Parses a string and returns an integer | |||||
String() |
Converts an object's value to a string | |||||
undefined |
Indicates that a variable has not been assigned a value | |||||
Deprecated. Use instead: decodeURI() decodeURIComponent() |
JSON parse
stringify
ES5
Math
Name | Chrome | Edge | Firefox | Safari | IE | desc |
---|---|---|---|---|---|---|
abs(x) |
ES1 | ES1 | ES1 | ES1 | ES1 | Returns the absolute value of x |
acos(x) |
Returns the arccosine of x, in radians | |||||
acosh(x) |
Returns the hyperbolic arccosine of x | |||||
asin(x) |
Returns the arcsine of x, in radians | |||||
asinh(x) | ES6 | ES6 | ES6 | ES6 | Returns the hyperbolic arcsine of x | |
atan(x) |
Returns the arctangent of x as a numeric value between -PI/2 and PI/2 radians | |||||
atan2(y, x) |
Returns the arctangent of the quotient of its arguments | |||||
atanh(x) | ES6 | ES6 | ES6 | ES6 | Returns the hyperbolic arctangent of x | |
cbrt(x) | ES6 | ES6 | ES6 | ES6 | Returns the cubic root of x | |
ceil(x) |
Returns x, rounded upwards to the nearest integer | |||||
clz32(x) | ES6 | ES6 | ES6 | ES6 | Returns the number of leading zeros in a 32-bit binary representation of x | |
cos(x) |
Returns the cosine of x (x is in radians) | |||||
cosh(x) | ES6 | ES6 | ES6 | ES6 | Returns the hyperbolic cosine of x | |
E |
Returns Euler's number (approx. 2.718) | |||||
exp(x) |
Returns the value of Ex | |||||
expm1(x) | ES6 | ES6 | ES6 | ES6 | Returns the value of Ex minus 1 | |
floor(x) |
Returns x, rounded downwards to the nearest integer | |||||
fround(x) | ES6 | ES6 | ES6 | ES6 | Returns the nearest (32-bit single precision) float representation of a number | |
LN2 |
Returns the natural logarithm of 2 (approx. 0.693) | |||||
LN10 |
Returns the natural logarithm of 10 (approx. 2.302) | |||||
log(x) |
Returns the natural logarithmof x | |||||
log10(x) | ES6 | ES6 | ES6 | ES6 | Returns the base-10 logarithm of x | |
LOG10E |
Returns the base-10 logarithm of E (approx. 0.434) | |||||
log1p(x) | ES6 | ES6 | ES6 | ES6 | Returns the natural logarithm of 1 + x | |
log2(x) | ES6 | ES6 | ES6 | ES6 | Returns the base-2 logarithm of x | |
LOG2E |
Returns the base-2 logarithm of E (approx. 1.442) | |||||
max(x1,x2,..) |
Returns the number with the highest value | |||||
min(x1,x2,..) |
Returns the number with the lowest value | |||||
PI |
Returns PI (approx. 3.14) | |||||
pow(x, y) |
Returns the value of x to the power of y | |||||
random() |
Returns a random number between 0 and 1 | |||||
round(x) |
Rounds x to the nearest integer | |||||
sign(x) | ES6 | ES6 | ES6 | ES6 | Returns the sign of a number (checks whether it is positive, negative or zero) | |
sin(x) |
Returns the sine of x (x is in radians) | |||||
sinh(x) | ES6 | ES6 | ES6 | ES6 | Returns the hyperbolic sine of x | |
sqrt(x) |
Returns the square root of x | |||||
SQRT1_2 |
Returns the square root of 1/2 (approx. 0.707) | |||||
SQRT2 |
Returns the square root of 2 (approx. 1.414) | |||||
tan(x) |
Returns the tangent of an angle | |||||
tanh(x) | ES6 | ES6 | ES6 | ES6 | Returns the hyperbolic tangent of a number | |
trunc(x) | ES6 | ES6 | ES6 | ES6 | Returns the integer part of a number (x) |
Number
Name | Chrome | Edge | Firefox | Safari | IE | desc |
---|---|---|---|---|---|---|
constructor |
ES1 | ES1 | ES1 | ES1 | ES1 | Returns the function that created JavaScript's Number prototype |
EPSILON | ES6 | ES6 | ES6 | ES6 | Returns the difference between 1 and the smallest number greater than 1 | |
isFinite() | ES6 | ES6 | ES6 | ES6 | Checks whether a value is a finite number | |
isInteger() | ES6 | ES6 | ES6 | ES6 | Checks whether a value is an integer | |
isNaN() | ES6 | ES6 | ES6 | ES6 | Checks whether a value is Number.NaN | |
isSafeInteger() | ES6 | ES6 | ES6 | ES6 | Checks whether a value is a safe integer | |
MAX_SAFE_INTEGER | ES6 | ES6 | ES6 | ES6 | Returns the maximum safe integer in JavaScript. | |
MIN_SAFE_INTEGER | ES6 | ES6 | ES6 | ES6 | Returns the minimum safe integer in JavaScript | |
MAX_VALUE |
Returns the largest number possible in JavaScript | |||||
MIN_VALUE |
Returns the smallest number possible in JavaScript | |||||
NaN |
Represents a "Not-a-Number" value | |||||
NEGATIVE_INFINITY |
Represents negative infinity (returned on overflow) | |||||
POSITIVE_INFINITY |
Represents infinity (returned on overflow) | |||||
parseFloat() | ES6 | ES6 | ES6 | ES6 | Parses a string an returns a number | |
parseInt() | ES6 | ES6 | ES6 | ES6 | Parses a string an returns a whole number | |
prototype |
Allows you to add properties and methods to an object | |||||
toExponential(x) | ES3 | ES3 | ES3 | ES3 | ES3 | Converts a number into an exponential notation |
toFixed(x) | ES3 | ES3 | ES3 | ES3 | ES3 | Formats a number with x numbers of digits after the decimal point |
toLocaleString() | ES3 | ES3 | ES3 | ES3 | ES3 | Converts a number into a string, based on the locale settings, (locales, options) >= IE11 |
toPrecision(x) | ES3 | ES3 | ES3 | ES3 | ES3 | Formats a number to x length |
toString() |
Converts a number to a string | |||||
valueOf() |
Returns the primitive value of a number |
Object
Name | Chrome | Edge | Firefox | Safari | IE | desc |
---|---|---|---|---|---|---|
constructor |
ES1 | ES1 | ES1 | ES1 | ES1 | Returns the function that created an object's prototype |
keys() | ES6 | ES6 | ES6 | ES6 | Returns an Array Iterator object with the keys of an object | |
prototype |
Let you to add properties and methods to JavaScript objects | |||||
toString() |
Converts an object to a string and returns the result | |||||
valueOf() |
Returns the primitive value of an object |
String
Name | Chrome | Edge | Firefox | Safari | IE | desc |
---|---|---|---|---|---|---|
charAt() |
ES1 | ES1 | ES1 | ES1 | ES1 | Returns the character at a specified index (position) |
charCodeAt() |
Returns the UTF-16 of the character at a specified index(0-65535) | |||||
codePointAt() | ES6 | ES6 | ES6 | ES6 | Returns the Unicode of the character at a specified index | |
concat() |
Returns two or more joined strings | |||||
constructor |
Returns the string's constructor function | |||||
endsWith() | ES6 | ES6 | ES6 | ES6 | Returns if a string ends with a specified value | |
fromCharCode() |
Returns Unicode values as characters | |||||
includes() | ES6 | ES6 | ES6 | ES6 | Returns if a string contains a specified value | |
indexOf() |
Returns the index (position) of the first occurrence of a value in a string | |||||
lastIndexOf() |
Returns the index (position) of the last occurrence of a value in a string | |||||
length |
Returns the length of a string | |||||
localeCompare() |
Compares two strings in the current locale(returns sort order -1, 1, or 0) | |||||
match() |
Searches a string for a value, or a regular expression, and returns the matches | |||||
prototype |
Allows you to add properties and methods to an object | |||||
repeat() | ES6 | ES6 | ES6 | ES6 | Returns a new string with a number of copies of a string | |
replace() |
Searches a string for a value, or a regular expression, and returns a string where the values are replaced | |||||
search() |
Searches a string for a value, or regular expression, and returns the index (position) of the match | |||||
slice() |
Extracts a part of a string and returns a new string | |||||
split() |
Splits a string into an array of substrings | |||||
startsWith() | ES6 | ES6 | ES6 | ES6 | Checks whether a string begins with specified characters | |
substr() |
Extracts a number of characters from a string, from a start index (position) | |||||
substring() |
Extracts characters from a string, between two specified indices (positions) | |||||
toLocaleLowerCase() |
Returns a string converted to lowercase letters, using the host's locale | |||||
toLocaleUpperCase() |
Returns a string converted to uppercase letters, using the host's locale | |||||
toLowerCase() |
Returns a string converted to lowercase letters | |||||
toString() |
Returns a string or a string object as a string | |||||
toUpperCase() |
Returns a string converted to uppercase letters | |||||
trim() | ES5 | ES5 | ES5 | ES5 | 9-11 | Returns a string with removed whitespaces |
trimEnd() | v66, Apr 2018 | v79, Jan 2020 | v61, Sep 2018 | v12, Sep 2018 | Returns a string with removed whitespaces from the end | |
trimStart() | v66, Apr 2018 | v79, Jan 2020 | v61, Sep 2018 | v12, Sep 2018 | Returns a string with removed whitespaces from the start | |
valueOf() |
Returns the primitive value of a string or a string object |
Secrets of the Javascript Ninja
Page Source