Sourav Mandal
Sourav Mandal

@souravcode

13 Tweets 7 reads Sep 30, 2022
🟒 10 JavaScript Array Methods in JavaScript!
A thread...⇩
βœ… Array Methods!
➊ forEach()
βž‹ some()
➌ includes()
➍ every()
➎ filter()
➏ sort()
➐ map()
βž‘ Arrar.from()
βž’ reduce()
➊0 Array.of()
➊ forEach()
➟ This method can help you to loop over array's items. The forEach() method can also be used on Maps and Sets.
βž‹ some()
➟ The some() method executes the function once for each array element:
⬘ If the function returns true, some() returns true and stops.
⬘ If the function returns false, some() returns false and stops.
➌ includes()
➟ The includes() method determines whether an array includes a certain value among its entries, returning true or false as appropriate.
➍ every()
➟ The every() method tests whether all elements in the array pass the test implemented by the provided function. It returns a Boolean value.
➎ filter()
➟ The filter() method creates a new array filled with elements that pass a test provided by a function.
➏ sort()
➟ This method is used to arrange/sort an array's item
either ascending or descending!
➐ map()
➟ map() creates a new array from calling a function for every array element.
βž‘ Arrar.from()
➟ The Array.from() method returns an array from any object with a length property.
βž’ reduce()
➟ The reduce() method applies a function against an accumulator and each element in the array.
➊0. Array.of()
➟ The Array.of() method creates a new Array instance from a variable number of arguments, regardless of the number or type of the arguments.
πŸ“’ That's it for this thread. If you found it useful!
Follow me
@souravcode
Hey, I am a Web Developer From India, Helping people learn web development. I Tweet Around. ⇩⇩⇩
🟒 HTML
🟒 CSS
🟒 JavaScript React, & More Tips & Web Development Content.
βœ… Like
⚑Retweet

Loading suggestions...