1. String Methods
charAt(index) - Returns the character at the specified
concat(str1, str2, ...) - Combines two or more strings.
includes(searchString) - Checks if a string contains a specified
value.
indexOf(searchValue) - Returns the index of the first occurrence of a
specified value.
slice(start, end) - Extracts part of a string and returns it.
split(separator) - Splits a string into an array of substrings.
replace(searchValue, newValue) - Replaces specified values in a
string.
toUpperCase() / toLowerCase() - Converts the string to
uppercase/lowercase.
2. Array Methods
push(element) - Adds one or more elements to the end of an array.
pop() - Removes the last element from an array.
shift() - Removes the first element from an array.
unshift(element) - Adds one or more elements to the beginning of an
array.
map(callback) - Creates a new array with the results of calling a
function for each element.
filter(callback) - Creates a new array with all elements that pass the
test.
reduce(callback, initialValue) - Reduces the array to a single value.
forEach(callback) - Executes a provided function once for each array
element.
find(callback) - Returns the value of the first element that satisfies
the test.
some(callback) / every(callback) - Tests whether at least one/all
elements pass the test.
slice(start, end) - Returns selected elements from an array.
3. Object Methods
Object.assign(target, ...sources) - Copies properties from one or more
source objects to a target object.
Object.keys(obj) - Returns an array of the object's own enumerable
property names.
Object.values(obj) - Returns an array of the object's own enumerable
property values.
Object.entries(obj) - Returns an array of a given object's own
enumerable property [key, value] pairs.
Object.freeze(obj) - Prevents modification of an object.
Object.seal(obj) - Prevents new properties from being added to an
object.
4. Number Methods
toFixed(digits) - Formats a number using fixed-point notation.
toPrecision(digits) - Returns a string representing a number with a
specified precision.
parseInt(string) - Parses a string and returns an integer.
parseFloat(string) - Parses a string and returns a floating-point
number.
isNaN(value) - Determines whether a value is NaN (Not-A-Number).
Number.isInteger(value) - Determines if a value is an integer.
5. Math Methods
Math.random() - Returns a random number between 0 (inclusive) and 1
(exclusive).
Math.floor(number) - Rounds a number down to the nearest integer.
Math.ceil(number) - Rounds a number up to the nearest integer.
Math.round(number) - Rounds a number to the nearest integer.
Math.max(...values) / Math.min(...values) - Returns the largest/smallest
number.
Math.sqrt(number) - Returns the square root of a number.
Math.pow(base, exponent) - Returns the base raised to the power of the
exponent.
6. Date Methods
new Date() - Creates a new date object.
getFullYear() - Returns the year.
getMonth() - Returns the month (0-11).
getDate() - Returns the day of the month (1-31).
getDay() - Returns the day of the week (0-6).
getHours(), getMinutes(), getSeconds() - Returns the hours, minutes, or
seconds.
toISOString() - Returns the date as an ISO 8601 string.
getTime() - Returns the number of milliseconds since January 1, 1970.
7. JSON Methods
JSON.parse(jsonString) - Parses a JSON string into a JavaScript object.
JSON.stringify(value) - Converts a JavaScript object to a JSON string.
8. Promise Methods
Promise.resolve(value) - Returns a promise that resolves with the given
value.
Promise.reject(reason) - Returns a promise that is rejected with the
given reason.
Promise.all(promises) - Waits for all promises to be resolved or any to
be rejected.
Promise.race(promises) - Waits until the first of the promises is
resolved or rejected.
9. DOM Methods
getElementById(id) - Returns the element with the specified ID.
querySelector(selector) - Returns the first element that matches the CSS
selector.
querySelectorAll(selector) - Returns all elements that match the CSS
selector.
createElement(tagName) - Creates a new element with the specified tag
name.
appendChild(child) - Adds a child element to the parent element.
removeChild(child) - Removes a child element from the parent element.
setAttribute(name, value) - Sets the value of an element's attribute.
getAttribute(name) - Returns the value of an element's attribute.
10. Event Methods
addEventListener(event, listener) - Adds an event listener to an
element.
removeEventListener(event, listener) - Removes an event listener from an
element.
preventDefault() - Prevents the default action of an event.
stopPropagation() - Stops the event from propagating further.
11. Error Handling Methods
try...catch - Handles errors by attempting code and catching exceptions.
throw - Throws an error.