returns the largest integer less than or equal to the given number
.toUpperCase()
returns a string in all capital letters
.trim()
.startsWith()
Number.isInteger()
Number Methods
Array Methods
Methods
Explaination
Example
Example Output
.length
returns the length (size)
[1, 2, 3]
“
.push()
adds an element at the end
[1, 2, 3]
“
.pop()
removes the last element
[1, 2, 3]
“
.shift()
removes the first element
“
.unshift()
adds the specified elements to the beginning
“
.concat()
merge two or more arrays
“
.join()
creates a new string by concatenating all of the elements in this array
“
.slice()
returns a shallow copy of a portion of an array into a new array object selected from start to end
“
.indexOf()
returns the first index at which a given element can be found in the array
“
.includes()
determines whether an array includes a certain value among its entries
“
.find()
returns the first element in the provided array that satisfies the provided testing function
“
.findIndex()
returns the index of the first element in an array that satisfies the provided testing function
“
.map()
creates a new array populated with the results of calling a provided function on every element in the calling array
“
.filter()
creates a shallow copy of a portion of a given array, filtered down to just the elements from the given array that pass the test implemented by the provided function
“
.reduce()
executes a user-supplied “reducer” callback function on each element of the array
“
.every()
tests whether all elements in the array pass the test
“
.some()
tests whether at least one element in the array passes the test implemented
“
.reverse()
reverses an array
“
.at()
takes an integer value and returns the item at that index, allowing for positive and negative integers