Skip to content

Conversation

@CruzMendez
Copy link

Homework 1

still having issues with terminal. missing link or bad syntax?
var currentItem = theArray[i];
fnc(currentItem);
var returnedItem = fnc(currentItem);
if (returnedItem = true) {
Copy link
Contributor

Choose a reason for hiding this comment

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

double check you code here.
how do you compare things to true or false in an if statement

var returnedItem = fnc(currentItem);
if (returnedItem) {
return returnedItem;
} else {
Copy link
Contributor

@jw56578 jw56578 Oct 7, 2017

Choose a reason for hiding this comment

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

in general, you don't ever want to have a else statement return in a loop

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