Skip to content

Conversation

@DianaAyoub
Copy link

I think it work .. I am so excited ...

Copy link
Owner

@remarcmij remarcmij left a comment

Choose a reason for hiding this comment

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

You're almost there! I count 5 YUMs but there are only three apples.

}
console.log(line);
}
if (appleEaten) { console.log('YUM!');}
Copy link
Owner

Choose a reason for hiding this comment

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

It is better to always format an if statement using multiple line, like this:

if (appleEaten) { 
   console.log('YUM!');
}

This makes it easier to add more lines to the if block should that be necessary in the future.

board[y][x] = 'R';
if (cellContents === 'A') {
appleEaten = true;
applesEaten ++;}
Copy link
Owner

Choose a reason for hiding this comment

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

The closing brace should be on a new line:

  applesEaten ++;
}

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