Skip to content

Conversation

@Arnold73
Copy link

No description provided.

//return null
export function find(theArray, fnc){

let myArray= [];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code for find isn't quite correct. Try to take the comment instructions a little more literally.
You don't need to create a new array "myArray". Its not necessary to how find works.
if the if statement is true, just return the item from the array, no need to push it to another array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants