scrimba
Learn JavaScript loops and iteration
break & continue statements: : challenge
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

break & continue statements: : challenge
AboutCommentsNotes
break & continue statements: : challenge
Expand for more info
index.js
run
preview
console
/* Challenge: USING break and continue
* Add a class of "watered" to one or more of the divs in the html
* Add a class of "weeds" to one of the divs in the html
* Create an array to contain each div with a class of "plot"
* Loop through the array:
If the plot has already been watered skip over it
If the plot contains weeds then exit the loop
If neither of these conditions is true add a class of "water" to the plot
*/


Console
/index.html
-3:40