Top 10 Must-Know JavaScript Functions: filter, map, shift, unshift, splice, some, some() and every. filter() filters an array based on the condition you provide and it returns a new array which contains items which satisfy those conditions. map() loops over an array and converts each item into something else. unshift() adds an element to the array and returns the new length of the array as result. every() true only if every single element in array satisfy our condition. slice() returns a shallow copy of a portion of an array into a newarray object selected from start to end.
Table of contents
1 filter()2 map()3 some()4 every()5 shift()6 unshift()7 slice()8 splice()9 includes()10 reverse()4 Comments
Sort: