1 00:00:00,200 --> 00:00:04,420 For the last challenge, we need to use the forEach method to capitalize all 2 00:00:04,420 --> 00:00:10,020 the strings in the months array and store them in the array named capitalizedMonths. 3 00:00:10,020 --> 00:00:14,523 To start, I'll copy and paste the code into Atom to make it easier to read. 4 00:00:19,273 --> 00:00:22,572 I started my solution to this challenge like all of the others, 5 00:00:22,572 --> 00:00:25,078 by stubbing out the call to the for each method. 6 00:00:25,078 --> 00:00:29,294 So months.forEach. 7 00:00:29,294 --> 00:00:32,000 I used month, the current value parameter name, 8 00:00:33,120 --> 00:00:37,120 followed by a fat arrow and a set of curly braces. 9 00:00:37,120 --> 00:00:41,730 To get the capitalized month, I called the string to uppercase method, 10 00:00:41,730 --> 00:00:45,190 to convert the month text into uppercase letters. 11 00:00:45,190 --> 00:00:47,715 So, first our variable const, 12 00:00:47,715 --> 00:00:56,745 capitalizedMonth=month.toUppercase. 13 00:00:58,570 --> 00:01:03,910 Then I pushed the capitalize month onto the capitalizedMonths array, 14 00:01:03,910 --> 00:01:08,840 capitalizedMonths.push(capitalizedMonth). 15 00:01:08,840 --> 00:01:10,291 And that's the solution. 16 00:01:10,291 --> 00:01:14,317 And just like we did before, we could also eliminate this code block. 17 00:01:17,585 --> 00:01:20,421 To do that, we would cut this code and 18 00:01:20,421 --> 00:01:24,910 place it inside of the call to the push method. 19 00:01:24,910 --> 00:01:28,750 That allows us to eliminate this intermediate variable and 20 00:01:28,750 --> 00:01:29,680 the curly braces. 21 00:01:31,630 --> 00:01:33,360 And that's it! 22 00:01:33,360 --> 00:01:38,320 Nice job sticking with it and completing all of the code challenges in this course. 23 00:01:38,320 --> 00:01:41,440 Thanks for practicing array iteration methods with me. 24 00:01:41,440 --> 00:01:44,600 Be sure to rate the challenges or videos in this course, and 25 00:01:44,600 --> 00:01:46,200 let us know your feedback. 26 00:01:46,200 --> 00:01:47,030 We'll see you next time.