JavaScript Library Functions | Programiz D11 Phase 2 Skip to main content

This page contains all methods in the JavaScript Standard Library: Math, String, Array, Object, Number, Built-In, and Function.

JavaScript Array Methods

Returns array by merging given value and/or arrays

Returns the constructor function for the array

Copies and overwrites elements within the array

Returns iterator containing key/value pair array

Returns array by filling elements with given value

Returns array by filtering elements on given test

Returns first element that satisfies a condition

Returns index of element that satisfies condition

Flattens the nested array to given depth

Returns new array by mapping and flattening array

Executes the given function on array elements

Checks if a value exists in an array

Returns the first index of occurrence of element

Checks if the given value is a JavaScript Array

Concatenates the array elements to a string

Returns an iterator containing keys of array items

Returns the last index of occurrence of an element

Returns the number of elements in an array

Returns array by mapping elements using given func

Creates a new Array instance from given arguments

Removes and returns the last array element

Adds elements to end of array & returns its length

Reduces array to single value from left to right

Reduces array to single value from right to left

Returns the array in reverse order

Removes and returns the first array element

Returns a shallow copy of a portion of an array

Tests if any element passes given test function

Sorts the elements of an array in specific order

Returns an array by changing its elements in place

Returns the string representation of an array

Adds elements to start of array and returns length

Returns iterator containing values of array items

Tests if all elements pass the given test function

Creates a new Array from array-like object

Returns string representing the elements of array

JavaScript Built-In Methods

Checks if the passed value is a finite number

Checks if a value is NaN or not

Parses argument and returns floating-point number

Parses string and returns integer of given radix

JavaScript Function

calls function with this value and array of args

Creates new function with given this value & args

Calls a function with a given this value and args

Returns source code of function as a string

Returns the number of parameters of a function

Returns the name of the given function

JavaScript Math Object

Returns the arccosine of a number in radians

Returns the hyperbolic arc-cosine of a number

Returns the arcsine of a number in radians

Returns the hyperbolic arcsine of a number

Returns the arctangent of a number in radians

Returns arctangent of the quotient of arguments

Returns the hyperbolic arctangent of a number

Returns the cube root of a specified number

Rounds a number up to the next largest integer

Returns num of leading zeros in binary of a number

Returns the cosine of an angle

Returns the hyperbolic cosine of a number

Rounds down a number to the next smallest integer

Returns the number with the highest value

Returns the number with the lowest value

Returns pseudo-random float number between 0 and 1

Returns the number rounded to the nearest integer

Returns the sign of a number

Returns the sine of an angle

Returns the hyperbolic sine of a number

Returns the tangent of an angle

Returns the hyperbolic tangent of a number

Returns the integer part of a number

Returns the absolute value of a number

Returns e (Euler's number) raised to given power

Returns e raised to given power minus 1

Returns the 32-bit float representation of number

Returns sqrt of the sum of squares of arguments

Returns the natural logarithm of a number

Returns the base 10 logarithm of a number

Returns the natural logarithm of 1 plus number

Returns the base 2 logarithm of a number

Returns a number raised to a certain power

Returns the square root of a specified number

JavaScript Number Methods

Returns string exponential notation of number

Formats a number using fixed point notation

Returns string denoting number to given precision

Returns a string representation of the number

Represents the smallest floating point number

Checks if the passed value is an integer or not

Checks whether the provided value is safe integer

Represents the maximum safe integer in JavaScript

Represents the maximum numeric value in JS

Represents the minimum safe integer in JavaScript

Represents smallest positive numeric value in JS

Represents Not-A-Number (NaN) value

Represents the negative infinite value

Represents the positive infinity value

Returns specified string representation of number

JavaScript Object

Copies all enumerable own properties to an object

Creates new object from given object as prototype

Defines properties on an object and returns object

Defines property directly on object and return it

Returns array of object's enumerable properties

Freezes and returns an object

Transforms list of key-value pairs into an object

Returns property descriptor of own property of obj

Returns all own property descriptors of an object

Returns array of all properties found in an object

Returns array of all symbol properties in object

Returns the prototype of the given object

Checks if object has a given property as its own

Checks if two values are the same value

Determines if an object is extensible

Determines if an object is frozen

Check if object exists in other objects prototype

Determines if an object is sealed

Returns array of object's enumerable property name

Prevents new properties from being added to object

Checks if the specified property is enumerable

Seals the given object

Sets prototype of object to another object or null

Returns the string representation of Object

Returns a string representing the object

Returns the primitive value of specified object

Return array of object's enumerable property value

JavaScript String Methods

Returns character at a specified index in string

Returns Unicode of the character at given index

Returns the Unicode point value at given index

Concatenates the arguments to the calling string

Checks if a string ends with a specified string

Returns a string from the given UTF-16 code units

Returns a string using the given code points

Checks if given string is found inside a string

Returns the first index of occurrence of a value

Returns the last index of occurrence of a value

Returns the number of characters in a string

Compares two strings in the current locale

Returns result of matching string with a regex

Returns iterator of results matching with a regex

Pads a string at the end to a given length

Pads a string at the start to a given length

Returns a string by repeating it given times

replace a substring/pattern in the string

Returns string by replacing all matching patterns

Searches for specified value in the string

Extracts and returns a section of the string

Returns the string divided into list of substring

Checks if a string begins with a specified string

Returns a specified part of the string

Returns lowercase representation of a string

Returns uppercase of a string

Removes whitespace from both ends of a string