Javascript
JavaScript Fundamentals -- Arrays in JavaScript

Exercise 4

Mute
Current Time 0:00
/
Duration Time 0:00
Loaded: 0%
Progress: 0%
Stream TypeLIVE
Remaining Time -0:00
 
PRO

Here's the last exercise for this section:

// forEach and includes

const scores = [5, 8, 3, 10, 7];

// 1. Loop over each item in the array using forEach and log it to the console after multiplying it by 3

// 2. Use the includes method to see if the number 8 exists in the array

// 3. Use the includes method to see if the string 'JavaScript' exists in the array

You can fork this exercise on StackBlitz here.

 

I finished! On to the next chapter