Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Practice forEach in JavaScript!
You have completed Practice forEach in JavaScript!
Preview
Let's walkthrough the solution to the seventh code challenge.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
the strings in the months array and store
them in the array named capitalizedMonths.
0:00
To start, I'll copy and paste the code
into Atom to make it easier to read.
0:01
I started my solution to this
challenge like all of the others,
0:10
by stubbing out the call to the for
each method.
0:13
So months.forEach.
0:16
I used month,
the current value parameter name,
0:20
followed by a fat arrow and
a set of curly braces.
0:24
To get the capitalized month,
I called the string to uppercase method,
0:28
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up