JavaScript
242 entries
array
-
Array.from()Creates a new array from an iterable or array-like object, with an optional map function. -
Array.isArray()Determines whether the passed value is an Array. -
Array.of()Creates a new array from the provided arguments, regardless of their number or type. -
Array.prototype.at()Returns the element at a given index, supporting negative indices. -
Array.prototype.concat()Merges two or more arrays into a new array. -
Array.prototype.copyWithin()Copies part of an array to another location in the same array, in place. -
Array.prototype.entries()Returns a new array iterator that yields [index, value] pairs. -
Array.prototype.every()Tests whether all elements pass the provided testing function. -
Array.prototype.fill()Fills all or part of an array with a static value in place. -
Array.prototype.filter()Creates a new array with all elements that pass the test in the callback. -
Array.prototype.find()Returns the first element that satisfies the provided testing function. -
Array.prototype.findIndex()Returns the index of the first element that satisfies the testing function. -
Array.prototype.findLast()Returns the last element that satisfies the provided testing function, iterating from the end. -
Array.prototype.flat()Returns a new array with sub-array elements flattened to the specified depth. -
Array.prototype.flatMap()Maps each element with a callback then flattens the result by one level. -
Array.prototype.forEach()Executes a provided function once for each array element. -
Array.prototype.group()Groups array elements into an object keyed by the result of a callback (proposal-stage; superseded by Object.groupBy). -
Array.prototype.includes()Determines whether an array contains a given value. -
Array.prototype.indexOf()Returns the first index at which a given element is found, or -1 if absent. -
Array.prototype.join()Joins all array elements into a string separated by a delimiter. -
Array.prototype.keys()Returns a new array iterator that yields the index of each element. -
Array.prototype.lastIndexOf()Returns the last index at which a given element is found, searching backwards. -
Array.prototype.map()Creates a new array populated with the results of calling a function on every element. -
Array.prototype.pop()Removes the last element from an array and returns it. -
Array.prototype.push()Adds one or more elements to the end of an array and returns the new length. -
Array.prototype.reduce()Reduces the array to a single value by applying an accumulator function left to right. -
Array.prototype.reverse()Reverses an array in place and returns the same array. -
Array.prototype.shift()Removes the first element from an array and returns it. -
Array.prototype.slice()Returns a shallow copy of a portion of an array into a new array. -
Array.prototype.some()Tests whether at least one element passes the provided testing function. -
Array.prototype.sort()Sorts the elements of an array in place and returns the same array. -
Array.prototype.splice()Changes an array in place by removing, replacing, or adding elements. -
Array.prototype.toReversed()Returns a new array with the elements reversed, without mutating the original. -
Array.prototype.toSorted()Returns a new sorted array without mutating the original. -
Array.prototype.unshift()Adds one or more elements to the beginning of an array and returns the new length. -
Array.prototype.values()Returns a new array iterator that yields the value of each element. -
Array.prototype.with()Returns a new array with the element at a given index replaced, without mutating the original.
console
-
console.assert()Logs an error message only if an assertion is falsy. -
console.count()Logs how many times this call with the given label has run. -
console.debug()Outputs a message to the console at the debug log level. -
console.dir()Displays an interactive list of the properties of an object. -
console.error()Outputs an error message to the console. -
console.group()Begins a new indented, collapsible group of console messages. -
console.groupEnd()Closes the most recently opened console group. -
console.info()Outputs an informational message to the console. -
console.log()Writes one or more values to the developer console. -
console.table()Displays tabular data as a table in the console. -
console.time()Starts a named timer for measuring how long an operation takes. -
console.timeEnd()Stops a named timer and logs the elapsed time. -
console.trace()Outputs a stack trace from the point where it is called. -
console.warn()Outputs a warning message to the console.
date
-
Date.now()Returns the current time as milliseconds since the Unix epoch. -
Date.parse()Parses a date string and returns its timestamp in milliseconds. -
Date.prototype.getDate()Returns the day of the month of a date in local time. -
Date.prototype.getDay()Returns the day of the week of a date in local time. -
Date.prototype.getFullYear()Returns the four-digit year of a date in local time. -
Date.prototype.getHours()Returns the hour of a date in local time. -
Date.prototype.getMinutes()Returns the minutes of a date in local time. -
Date.prototype.getMonth()Returns the month of a date in local time as a zero-based number. -
Date.prototype.getSeconds()Returns the seconds of a date in local time. -
Date.prototype.getTime()Returns the timestamp of a Date as milliseconds since the epoch. -
Date.prototype.toISOString()Returns the date as an ISO 8601 string in UTC. -
Date.prototype.toLocaleDateString()Returns the date portion formatted for a locale. -
Date.prototype.toLocaleString()Returns the date and time formatted for a locale. -
Date.UTC()Returns the timestamp for date components interpreted as UTC.
global
-
clearInterval()Cancels a repeating timer previously created with setInterval(). -
clearTimeout()Cancels a timeout previously scheduled with setTimeout(). -
decodeURIComponent()Decodes a URI component previously encoded with encodeURIComponent(). -
encodeURIComponent()Encodes a URI component by escaping special characters. -
fetch()Starts a network request and returns a promise resolving to a Response. -
isFinite()Determines whether a value is a finite number after coercion. -
isNaN()Determines whether a value is NaN after coercing it to a number. -
parseFloat()Parses a string and returns a floating-point number. -
parseInt()Parses a string and returns an integer of the specified radix. -
queueMicrotask()Schedules a callback to run in the microtask queue. -
requestAnimationFrame()Schedules a callback to run before the next browser repaint. -
setInterval()Repeatedly calls a function with a fixed delay between each call. -
setTimeout()Schedules a function to run once after a delay in milliseconds. -
structuredClone()Creates a deep copy of a value using the structured clone algorithm.
json
map-set
-
Map.prototype.delete()Removes a key and its value from a Map. -
Map.prototype.get()Returns the value associated with a key in a Map. -
Map.prototype.has()Returns whether a key exists in a Map. -
Map.prototype.set()Adds or updates a key/value pair in a Map. -
Map.prototype.sizeThe number of key/value pairs in a Map. -
Set.prototype.add()Adds a value to a Set if it is not already present. -
Set.prototype.delete()Removes a value from a Set. -
Set.prototype.has()Returns whether a value exists in a Set. -
WeakMapA collection of key/value pairs with object keys held weakly. -
WeakSetA collection of objects held weakly, with no duplicates.
math
-
Math.abs()Returns the absolute value of a number. -
Math.atan2()Returns the angle in radians between the positive x-axis and the point (x, y). -
Math.cbrt()Returns the cube root of a number. -
Math.ceil()Rounds a number up to the next largest integer. -
Math.cos()Returns the cosine of an angle given in radians. -
Math.EEuler's number, the base of natural logarithms, approximately 2.71828. -
Math.exp()Returns e raised to the power of a number. -
Math.floor()Rounds a number down to the largest integer less than or equal to it. -
Math.hypot()Returns the square root of the sum of squares of its arguments (Euclidean norm). -
Math.log()Returns the natural logarithm (base e) of a number. -
Math.log10()Returns the base-10 logarithm of a number. -
Math.log2()Returns the base-2 logarithm of a number. -
Math.max()Returns the largest of the given numbers. -
Math.min()Returns the smallest of the given numbers. -
Math.PIThe ratio of a circle's circumference to its diameter, approximately 3.14159. -
Math.pow()Returns the base raised to the power of the exponent. -
Math.random()Returns a pseudo-random floating point number in the range [0, 1). -
Math.round()Returns the value of a number rounded to the nearest integer. -
Math.sign()Returns the sign of a number, indicating whether it is positive, negative, or zero. -
Math.sin()Returns the sine of an angle given in radians. -
Math.sqrt()Returns the square root of a number. -
Math.tan()Returns the tangent of an angle given in radians. -
Math.trunc()Returns the integer part of a number by removing any fractional digits.
number
-
Number.EPSILONThe smallest interval between two representable numbers, useful for float comparisons. -
Number.isFinite()Determines whether the passed value is a finite number. -
Number.isInteger()Determines whether the passed value is an integer. -
Number.isNaN()Determines whether the passed value is the NaN value. -
Number.isSafeInteger()Determines whether a value is an integer that can be exactly represented as a double. -
Number.MAX_SAFE_INTEGERThe maximum safe integer in JavaScript (2^53 - 1). -
Number.MAX_VALUEThe largest positive finite value representable as a JavaScript number. -
Number.MIN_SAFE_INTEGERThe minimum safe integer in JavaScript (-(2^53 - 1)). -
Number.parseFloat()Parses a string argument and returns a floating point number. -
Number.parseInt()Parses a string argument and returns an integer of the specified radix. -
Number.POSITIVE_INFINITYThe value representing positive infinity. -
Number.prototype.toFixed()Formats a number using fixed-point notation with a set number of decimals. -
Number.prototype.toPrecision()Returns a string representing the number to the specified number of significant digits. -
Number.prototype.toString()Returns a string representing the number in the specified radix (base).
object
-
Object.assign()Copies enumerable own properties from source objects to a target object. -
Object.create()Creates a new object with the specified prototype and optional properties. -
Object.defineProperties()Defines or modifies multiple properties on an object using descriptors. -
Object.defineProperty()Defines a new property or modifies an existing one with a descriptor. -
Object.entries()Returns an array of an object's own enumerable [key, value] pairs. -
Object.freeze()Freezes an object, preventing new properties and changes to existing ones. -
Object.fromEntries()Transforms a list of [key, value] pairs into an object. -
Object.getOwnPropertyDescriptor()Returns the property descriptor for an own property of an object. -
Object.getOwnPropertyNames()Returns an array of all own string-keyed property names, including non-enumerable ones. -
Object.getPrototypeOf()Returns the prototype of the specified object. -
Object.groupBy()Groups elements of an iterable into an object keyed by the result of a callback. -
Object.hasOwn()Returns true if the object has the specified property as its own (not inherited) property. -
Object.is()Determines whether two values are the same value (SameValue equality). -
Object.isFrozen()Determines whether an object is frozen. -
Object.keys()Returns an array of an object's own enumerable string-keyed property names. -
Object.preventExtensions()Prevents new properties from being added to an object. -
Object.seal()Seals an object, preventing new properties and making existing ones non-configurable. -
Object.setPrototypeOf()Sets the prototype of a specified object to another object or null. -
Object.values()Returns an array of an object's own enumerable property values.
operators
-
Arrow function (=>)Creates a concise function expression that lexically binds this. -
awaitPauses an async function until a promise settles and yields its resolved value. -
Comma operator (,)Evaluates each operand left to right and returns the value of the last. -
Conditional (ternary) operator (?:)Chooses between two expressions based on a condition. -
deleteRemoves a property from an object. -
Destructuring assignmentUnpacks array elements or object properties into distinct variables. -
Equality (==)Compares two values for equality after type coercion. -
Exponentiation (**)Raises the left operand to the power of the right operand. -
inTests whether a property exists in an object or its prototype chain. -
instanceofTests whether a constructor's prototype appears in an object's prototype chain. -
Logical AND (&&)Returns the first falsy operand, or the last operand if all are truthy. -
Logical assignment (&&=, ||=, ??=)Combines a logical operation with assignment, assigning conditionally. -
Logical OR (||)Returns the first truthy operand, or the last operand if all are falsy. -
newCreates an instance of an object from a constructor function or class. -
Nullish coalescing (??)Returns the right operand only when the left operand is null or undefined. -
Optional chaining (?.)Accesses a nested property or calls a method, short-circuiting to undefined if the reference is null or undefined. -
Rest (...)Collects remaining function arguments or destructured elements into an array or object. -
Spread (...)Expands an iterable or object into individual elements, arguments, or properties. -
Strict equality (===)Compares two values for equality without type coercion. -
superCalls the parent constructor or accesses parent-class methods. -
thisRefers to the execution context of the current function call. -
typeofReturns a string indicating the type of an operand. -
voidEvaluates an expression and returns undefined.
promise
-
Promise.all()Waits for all promises to fulfill, or rejects as soon as one rejects. -
Promise.allSettled()Waits for all promises to settle and reports each outcome. -
Promise.any()Fulfills with the first promise to fulfill, rejecting only if all reject. -
Promise.prototype.catch()Registers a callback for the rejection of a promise. -
Promise.prototype.finally()Registers a callback that runs when the promise settles, regardless of outcome. -
Promise.prototype.then()Registers callbacks for the fulfillment and/or rejection of a promise. -
Promise.race()Settles as soon as the first input promise settles, fulfilled or rejected. -
Promise.reject()Returns a promise that is rejected with the given reason. -
Promise.resolve()Returns a promise that is resolved with the given value. -
Promise.withResolvers()Creates a promise together with its resolve and reject functions.
regexp
-
Named capture groupsCaptures substrings under a name for readable access via match.groups. -
RegExp flagsModifiers like g, i, m, s, u, y that change how a pattern matches. -
RegExp global flag (g)Makes a regular expression find all matches rather than stopping at the first. -
RegExp sticky flag (y)Anchors each match attempt exactly at lastIndex. -
RegExp.prototype.exec()Executes a search and returns a match array, or null if no match. -
RegExp.prototype.lastIndexThe index at which the next match will start for global or sticky regexes. -
RegExp.prototype.sourceThe text of the regular expression pattern, without delimiters or flags. -
RegExp.prototype.test()Tests whether a regular expression matches a string.
statements
-
async functionDeclares a function that always returns a promise and may use await. -
breakTerminates the nearest enclosing loop or switch, optionally to a label. -
classDeclares a class with a constructor, methods, and optional inheritance. -
constDeclares a block-scoped binding that cannot be reassigned. -
continueSkips the rest of the current loop iteration and proceeds to the next one. -
debuggerPauses execution at this point if a debugger is attached. -
do...whileRepeats a block of code at least once, then while a condition remains truthy. -
exportExposes bindings from an ES module so other modules can import them. -
forRepeats a block of code with an initializer, condition, and update expression. -
for...inIterates over the enumerable string-keyed property names of an object. -
for...ofIterates over the values of an iterable such as an array, string, Map, or Set. -
functionDeclares a named function that is hoisted within its scope. -
if...elseExecutes a block of code conditionally, with optional else branches. -
importImports bindings exported by another ES module. -
labelNames a loop or block so break and continue can target it. -
letDeclares a block-scoped, reassignable variable. -
returnEnds function execution and optionally specifies a value to return. -
switchSelects one of many code blocks to run by comparing a value with case labels. -
throwRaises a user-defined exception, transferring control to the nearest catch. -
try...catch...finallyRuns code that may throw, handling errors and optionally running cleanup. -
varDeclares a function-scoped (or globally-scoped) variable, optionally initializing it. -
whileRepeats a block of code while a condition remains truthy. -
yieldPauses a generator function and produces a value to its caller.
string
-
String.fromCharCode()Creates a string from a sequence of UTF-16 code units. -
String.prototype.at()Returns the character at a given index, supporting negative indices. -
String.prototype.charAt()Returns the character (UTF-16 code unit) at the specified index. -
String.prototype.charCodeAt()Returns the UTF-16 code unit value at the given index. -
String.prototype.codePointAt()Returns the Unicode code point value at the given index. -
String.prototype.concat()Concatenates string arguments to the calling string and returns a new string. -
String.prototype.endsWith()Determines whether a string ends with the given substring. -
String.prototype.includes()Determines whether a string contains the given substring. -
String.prototype.indexOf()Returns the index of the first occurrence of a substring, or -1 if absent. -
String.prototype.lastIndexOf()Returns the index of the last occurrence of a substring, or -1 if absent. -
String.prototype.localeCompare()Compares two strings in the current or specified locale, returning sort order. -
String.prototype.match()Matches a string against a regular expression and returns the result. -
String.prototype.matchAll()Returns an iterator of all matches of a regular expression, including capture groups. -
String.prototype.normalize()Returns the Unicode Normalization Form of the string. -
String.prototype.padEnd()Pads the end of a string with another string until it reaches a target length. -
String.prototype.padStart()Pads the start of a string with another string until it reaches a target length. -
String.prototype.repeat()Returns a new string containing the given number of copies of the string. -
String.prototype.replace()Returns a new string with the first match of a pattern replaced. -
String.prototype.replaceAll()Returns a new string with all matches of a pattern replaced. -
String.prototype.search()Returns the index of the first match of a regular expression, or -1. -
String.prototype.slice()Extracts a section of a string and returns it as a new string. -
String.prototype.split()Splits a string into an array of substrings using a separator. -
String.prototype.startsWith()Determines whether a string begins with the given substring. -
String.prototype.substr()Returns a portion of a string starting at an index for a given length (legacy). -
String.prototype.substring()Returns the part of a string between two indices. -
String.prototype.toLowerCase()Returns the calling string converted to lowercase. -
String.prototype.toUpperCase()Returns the calling string converted to uppercase. -
String.prototype.trim()Returns a new string with whitespace removed from both ends. -
String.prototype.trimEnd()Returns a new string with whitespace removed from the end. -
String.prototype.trimStart()Returns a new string with whitespace removed from the beginning. -
String.raw()A tag function for template literals that returns the raw string without processing escapes.