We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1
### Basic Methods:
1. **sort()**: Sorts the elements of an array.
2. **Math.random()**: Generates a random number between 0 and 1. 3. **Math.floor()**: Rounds a number down to the nearest integer. 4. **Math.ceil()**: Rounds a number up to the nearest integer. 5. **Math.max()**: Returns the largest number. 6. **Math.min()**: Returns the smallest number. 7. **slice()**: Returns a shallow copy of a portion of an array into a new array. 8. **split()**: Splits a string into an array of substrings. 9. **join()**: Joins all elements of an array into a string. 10. **map()**: Creates a new array with the results of calling a provided function on every element in the calling array. 11. **forEach()**: Executes a provided function once for each array element. 12. **filter()**: Creates a new array with all elements that pass the test implemented by the provided function. 13. **find()**: Returns the value of the first element that satisfies the provided testing function. 14. **reduce()**: Executes a reducer function on each element of the array, resulting in a single output value. 15. **some()**: Tests whether at least one element in the array passes the test implemented by the provided function. 16. **every()**: Tests whether all elements in the array pass the test implemented by the provided function. 17. **concat()**: Merges two or more arrays. 18. **includes()**: Determines whether an array includes a certain value. 19. **indexOf()**: Returns the first index at which a given element can be found in the array, or -1 if it is not present. 20. **push()**: Adds one or more elements to the end of an array and returns the new length of the array. 21. **pop()**: Removes the last element from an array and returns that element. 22. **shift()**: Removes the first element from an array and returns that element. 23. **unshift()**: Adds one or more elements to the beginning of an array and returns the new length of the array.