Javascript Tricks - Array First Rr Undefined Condition

preview_player
Показать описание
Instead of making an intuitive loop and using several lines of code - let's get to know the built in javascript function - find!

Goes through all the members in the array one by one and checks the requested condition, and the first member that meets the condition is returned (if there is one at all, if not than a null value is returned)

For more details:

#javascripttricks #javascript #smartcoding #web #visualstudiocode #javascriptobjects #js #frontend #client #backend #server #webdevelopment #webdeveloper #javascriptfunctions #javascriptarrays
Рекомендации по теме
Комментарии
Автор

These are not equivalent. The find method will return undefined if there is no match.

andrews