Version |
Returns |
Signature |
Description |
Links |
String Static Properties & Functions |
ES1 |
String |
fromCharCode(n1, n2, ...) |
Converts a series of Unicode values into a string |
MDN | w3schools.com
|
String Instance Properties & Functions |
ES1 |
Number |
length |
Returns the length of the string |
MDN | w3schools.com
|
ES1 |
String |
charAt(index) |
Returns a 1 character string representing the character at the specified index |
MDN | w3schools.com
|
ES1 |
Number |
charCodeAt(index) |
Returns the Unicode of the character at the specified index |
MDN | w3schools.com
|
ES3 |
String |
concat(string1, string2, ...) |
Joins two or more strings, and returns a new joined string |
MDN | w3schools.com
|
ES6 |
Boolean |
endsWith(str) |
Checks whether a string ends with specified string/characters |
MDN | w3schools.com
|
ES6 |
Boolean |
includes(searchValue, [start]) |
Checks wheter a string contains the specified string/characters |
MDN | w3schools.com
|
ES1 |
Number |
indexOf(searchValue, [start]) |
Returns the position of the first occurrence of a specified value in a string, or -1 if no match. |
MDN | w3schools.com
|
ES1 |
Number |
lastIndexOf(searchValue, [start]) |
Returns the position of the last occurrence of a specified value in a string, or -1 if no match. |
MDN | w3schools.com
|
ES3 |
Number |
localeCompare(compareString) |
-1 if string comes before the compareString, 0 if they are equal, and 1 if it comes after
|
MDN | w3schools.com
|
ES3 |
Array |
match(regexOrString) |
An array of matches, 1 item for each match, or null if no match is found |
MDN | w3schools.com
|
ES6 |
String |
repeat(count) |
A new string containing count copies of the original string |
MDN | w3schools.com
|
ES3 |
String |
replace(regexOrString, newValue) |
A new string where the specified value(s) has been replaced by the new value (use /g to replace all,
otherwise only the first occurrence is replaced)
|
MDN | w3schools.com
|
ES3 |
Number |
search(regexOrString) |
The position of the first occurrence of the match, or -1 if no match found |
MDN | w3schools.com
|
ES3 |
String |
slice(start, [end]) |
Extracts part of a string from start position up to but not including
the end position (or to the end of string if end is omitted), and returns a new string |
MDN | w3schools.com
|
ES3 |
String[] |
split([separator], [limit]) |
An array of strings. The separator can be a string or a regex. If separator is omitted,
an array of 1 item containing the entire string is returned. If limit is specified, it will indicate
the maximum number of items to return.
|
MDN | w3schools.com
|
ES6 |
Boolean |
startsWith(searchValue, [start]) |
Returns true of the string starts with searchValue. If start is specified, it indicates
the position in the string from which to start the search.
|
MDN | w3schools.com
|
ES3 |
String |
substr(start, [length]) |
Returns a new string by extracting part of the original string, from the start position.
If length is specified, it designates the number of desired characters. If omitted, the
rest of the string is returned.
|
MDN | w3schools.com
|
ES1 |
String |
substring(start, [end]) |
Almost identical to slice(), with some subtle differences.
See here
for more details.
|
MDN | w3schools.com
|
ES3 |
String |
toLocaleLowerCase() |
Converts a string to lowercase, according to the host's locale |
MDN | w3schools.com
|
ES3 |
String |
toLocaleUpperCase() |
Converts a string to uppercase, according to the host's locale |
MDN | w3schools.com
|
ES1 |
String |
toLowerCase() |
Converts a string to lowercase |
MDN | w3schools.com
|
ES3 |
String |
toString() |
Returns the value of a String object |
MDN | w3schools.com
|
ES1 |
String |
toUpperCase() |
Converts a string to uppercase |
MDN | w3schools.com
|
ES5.1 |
String |
trim() |
Returns a new string by removing all whitespace from both ends |
MDN | w3schools.com
|
ES1 |
String |
valueOf() |
Returns the primitive value of a String object (generally this function is only used internally
by the JavaScript engine)
|
MDN | w3schools.com
|
Number Static Properties & Functions |
ES1 |
Number |
MAX_VALUE |
Returns the largest number possible in JavaScript |
MDN | w3schools.com
|
ES1 |
Number |
MIN_VALUE |
Returns the smallest number possible in JavaScript |
MDN | w3schools.com
|
ES1 |
Number |
NEGATIVE_INFINITY |
Represents negative infinity |
MDN | w3schools.com
|
ES1 |
Number |
NaN |
Represents a "Not-a-Number" value |
MDN | w3schools.com
|
ES1 |
Number |
POSITIVE_INFINITY |
Represents infinity |
MDN | w3schools.com
|
ES6 |
Boolean |
isFinite(val) |
Checks whether a value is a finite number |
MDN | w3schools.com
|
ES6 |
Boolean |
isInteger(val) |
Checks whether a value is an integer |
MDN | w3schools.com
|
ES6 |
Boolean |
isNaN(val) |
Checks whether a value is a Number.NaN |
MDN | w3schools.com
|
ES6 |
Boolean |
isSafeInteger(val) |
Checks wheter a value is a safe integer |
MDN | w3schools.com
|
Number Instance Properties & Functions |
ES3 |
String |
toExponential([fractionalDigits]) |
Converts a number into an exponential notation |
MDN | w3schools.com
|
ES3 |
String |
toFixed([digits]) |
Formats a number with x numbers of digits after the decimal point |
MDN | w3schools.com
|
ES3 |
String |
toPrecision([precision]) |
Formats a number to x length |
MDN | w3schools.com
|
ES1 |
String |
toString([radix]) |
Converts a number to a string |
MDN | w3schools.com
|
ES1 |
Number |
valueOf() |
Returns the primitive value of a number |
MDN | w3schools.com
|