Implement Your Own "mysome" Method Of Array.

easy
Implement your own "mysome" method of Array.
       You must use prototyping for implementation.
        The some() method tests whether at least one element in the array passes the test implemented by the provided function. It returns a Boolean value.

       You can refer the code below for inbuilt "some" method.

	const array = [1, 2, 3, 4, 5];
	
	const even = function(element){return element % 2 === 0};

	console.log(array.some(even));
	// expected output: true

Input Format

NA

Output Format

NA

Constraints

NA

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input

        
Output

        
Previous
Scrapping 2
Next
Implement Your Own "myevery" Method Of Array.

Related Questions