diff --git a/languages/javascript.js b/languages/javascript.js index f5fb858..1aac6d6 100644 --- a/languages/javascript.js +++ b/languages/javascript.js @@ -95,3 +95,84 @@ arr.reduce(callback[, initialValue]) // Apply a function against arr.reduceRight(callback[, initialValue]) // Apply a function against an accumulator and each value of the array (from right-to-left) as to reduce it to a single value. arr.some(callback[, initialValue]) // Returns true if at least one element in this array satisfies the provided testing function. arr.values() // Returns a new Array Iterator object that contains the values for each index in the array. + +/* ******************************************************************************************* + * GLOBAL OBJECTS > STRING + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String + * ******************************************************************************************* */ + +// Global object: properties +String.length // Reflects the length of the string. Read-only. +String.prototype // Allows you to add properties and methods to the String object. + +// Global object: methods +String.fromCharCode(num1[, ...[, numN]]) // Returns a string created from the specified sequence of UTF-16 code units. +String.fromCodePoint(num1[, ...[, numN]]) // Returns a string created from the specified sequence of code points. +String.raw(callSite, ...substitutions) // Returns a string created from a raw template string. + +// Instance: properties +str.length // Reflects the length of the string. Read-only. + +// Instance: methods +str.charAt(index) // Returns the specified character from a string. +str.charCodeAt(index) // Returns a number that is the UTF-16 code unit value at the given index. +str.codePointAt(index) // Returns a non-negative integer that is the Unicode code point value. +str.concat(string2, string3[,..., stringN]) // Combines the text of two or more strings and returns a new string. +str.endsWith(searchString[, length]) // Determines whether a string ends with the characters of a specified string. +str.includes(searchString[, position]) // Determines whether one string may be found within another string. +str.indexOf(searchValue[, fromIndex]) // Returns the index within the calling String object of the first occurrence of the specified value. +str.lastIndexOf(searchValue[, fromIndex]) // Returns the index within the calling String object of the last occurrence of the specified value. +str.localeCompare(compareString[, locales[, options]])// Returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order. +str.match(regexp) // Retrieves the result of matching a string against a regular expression. +str.matchAll(regexp) // Returns an iterator of all results matching a string against a regular expression, including capturing groups. +str.normalize([form]) // Returns the Unicode Normalization Form of the string. +str.padEnd(targetLength [, padString]) // Pads the current string with another string (multiple times, if needed) until the resulting string reaches the given length. +str.padStart(targetLength [, padString]) // Pads the current string with another string (multiple times, if needed) until the resulting string reaches the given length. The padding is applied from the start of the current string. +str.repeat(count) // Constructs and returns a new string which contains the specified number of copies of the string on which it was called, concatenated together. +str.replace(regexp|substr, newSubstr|function) // Returns a new string with some or all matches of a pattern replaced by a replacement. +str.replaceAll(regexp|substr, newSubstr|function) // Returns a new string with all matches of a pattern replaced by a replacement. +str.search(regexp) // Executes a search for a match between a regular expression and this String object. +str.slice(beginIndex[, endIndex]) // Extracts a section of a string and returns it as a new string. +str.split([separator[, limit]]) // Divides a String into an ordered list of substrings, puts these substrings into an array, and returns the array. +str.startsWith(searchString[, position]) // Determines whether a string begins with the characters of a specified string. +str.substring(indexStart[, indexEnd]) // Returns the part of the string between the start and end index. +str.toLocaleLowerCase([locale, localeN]) // The characters within a string are converted to lower case while respecting the current locale. +str.toLocaleUpperCase([locale, localeN]) // The characters within a string are converted to upper case while respecting the current locale. +str.toLowerCase() // Returns the calling string value converted to lowercase. +str.toString() // Returns a string representing the specified object. Overrides the Object.prototype.toString() method. +str.toUpperCase() // Returns the calling string value converted to uppercase. +str.trim() // Trims whitespace from the beginning and end of the string. +str.trimStart() // Trims whitespace from the beginning of the string. +str.trimEnd() // Trims whitespace from the end of the string. + +/* ******************************************************************************************* + * GLOBAL OBJECTS > NUMBER + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number + * ******************************************************************************************* */ + +// Global object: properties +Number.EPSILON // Represents the difference between 1 and the smallest floating-point number greater than 1. +Number.MAX_SAFE_INTEGER // Represents the maximum safe integer in JavaScript (2^53 - 1). +Number.MAX_VALUE // Represents the maximum positive finite value of JavaScript. +Number.MIN_SAFE_INTEGER // Represents the minimum safe integer in JavaScript (-(2^53 - 1)). +Number.MIN_VALUE // Represents the smallest positive finite value of JavaScript. +Number.NaN // Special "Not a Number" value. +Number.NEGATIVE_INFINITY // Represents negative infinity. +Number.POSITIVE_INFINITY // Represents positive infinity. +Number.prototype // Allows you to add properties and methods to a Number object. + +// Global object: methods +Number.isFinite(value) // Determines whether the passed value is a finite number. +Number.isInteger(value) // Determines whether the passed value is an integer. +Number.isNaN(value) // Determines whether the passed value is NaN. +Number.isSafeInteger(value) // Determines whether the provided value is a number that is a safe integer. +Number.parseFloat(string) // Parses a string argument and returns a floating point number. +Number.parseInt(string[, radix]) // Parses a string argument and returns an integer of the specified radix or base. + +// Instance: methods +numObj.toExponential([fractionDigits]) // Returns a string representing the number in exponential notation. +numObj.toFixed([digits]) // Returns a string representing the number in fixed-point notation. +numObj.toLocaleString([locales[, options]]) // Returns a string with a language sensitive representation of this number. Overrides the Object.prototype.toLocaleString() method. +numObj.toPrecision([precision]) // Returns a string representing the number to a specified precision in fixed-point or exponential notation. +numObj.toString([radix]) // Returns a string representing the specified object. Overrides the Object.prototype.toString() method. +numObj.valueOf() // Returns the primitive value of a Number object. \ No newline at end of file