In Javascript some() method calls the callback function on each item of the array and checks it against the condition and if the condition returns true it returns a boolean value true else returns false.

Syntax

array.some(callback_function, extra_arguments);
  • callback_function: Represents the function to be called on each item.
  • extra_arguments: Represents additional arguments to be passed to a callback function.

some() the method does not modify or change the existing array.

#javascript #web development

Working with Javascript Array some() method with examples for Beginners
1.90 GEEK