1
1
mirror of https://github.com/namibia/awesome-cheatsheets.git synced 2024-11-23 21:27:40 +00:00

Update javascript.js

This commit is contained in:
Sheikh Haziq 2021-12-07 20:34:25 +05:30 committed by GitHub
parent cc3cb1bc11
commit c245e58730
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,6 +63,7 @@ arr.length // Reflects the number of e
arr.copyWithin(target, start, end) // Copies a sequence of array elements within the array.
arr.fill(value, start, end) // Fills all the elements of an array from a start index to an end index with a static value.
arr.pop() // Removes the last element from an array and returns that element.
arr.flat() // merges nested array into one single array
arr.push([element1[, ...[, elementN]]]) // Adds one or more elements to the end of an array and returns the new length of the array.
arr.reverse() // Reverses the order of the elements of an array in place — the first becomes the last, and the last becomes the first.
arr.shift() // Removes the first element from an array and returns that element.