Skip to content

Conversation

@Jasbriana
Copy link

No description provided.

for (let i = 0; i< elements.length; i++) {
newArray.push(cb(elements[i]))
return Array;
}
Copy link

Choose a reason for hiding this comment

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

watch out for your naming, it has to be consistent and you usually want to use camelCase.
so for instance NewArray should be newArray (like it is in your for-loop).
Then you want to return the newArray outside of the loop. If the return statement is inside the for-loop then the for-loop will stop looping!

},



Copy link

Choose a reason for hiding this comment

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

Not sure why you have two here...

@sulemc
Copy link

sulemc commented Mar 22, 2018

Let me know if you have any questions! You can use the code you have here as a reference for future assignments!

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