Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Let's walkthrough the solution to the fourth code challenge.
For this challenge, we need to use the forEach method to iterate over
the alphabet array, which contains each of the letters in the alphabet, and
store each letter in the array noel except for the L character.
Let's start with copying and pasting the code for
this challenge into Atom in order to make the code easier to read.
To solve this challenge, I added the call to forEach method with anonymous call
back function using arrow function syntax.
I used character for the current value parameter name.
And I included a set of curly braces to define a code block.
Then I added an if statement to ensure that the current character wasn't
the letter L.
So, if (character
And if the if statement evaluates the true,
I push the current character onto the noel array.
And that's my solution.
We'll see you after the next challenge.
You need to sign up for Treehouse in order to download course files.Sign up