2024 | FrontEnd Dev | Falak Naz | Personal Branding
Must know JavaScript
Array Methods
2024 REPOST
every
Tests if all elements in the array pass
the condition provided in the callback
function. the every() function always
returns a Boolean value:
true if all elements in the array pass
the test.
false if at least one element fails the
test.
2024 REPOST
filter
Creates a new array with all elements
that pass the condition in the callback
function.
2024 REPOST
find
Returns the first element that satisfies
the provided condition in the callback
function. If no elements satisfy the
condition, it returns undefined.
2024 REPOST
includes
Checks if an array contains a certain
value.
true if the array contains the
specified value.
false if the array does not contain
the specified value.
2024 REPOST
forEach
Executes a provided function once for
each array element.
2024 REPOST
reduce
The reduce() function processes each
element in an array to produce a single
value. It applies a callback function to
each element, and the result of each
step is used in the next iteration. This
way, it "reduces" the array to one final
value.
2024 REPOST
some
Tests whether at least one element
passes the condition provided in the
callback function.
2024 REPOST
map
Creates a new array with the results of
calling a function on every array
element.
2024 REPOST
Follow me!
Like this!
Share it!
@iamfalkunaz