JavaScript Simplified / Chapter 100 Exercises

  • Index of exercises
  • Email me

1

2

3

4

5

6

7

8

9

10

Congratulations. You've aced all the exercises for this chapter.


To practice on your own, or to check code you believe shouldn't have been scored as incorrect, go to CodePen.


Are you ready to rate JavaScript Simplified? on Amazon?


Rate it on Amazon.

0,1,2,3,4,5,6,7,8,9

0

0

0

0

Fill in the blank to complete the first line of a loop through the set towns. for (const aValue __ towns) { of of
Fill in the blank complete the first line of a loop through the set towns. Make up the name of the constant. ____________ of towns) { for (const value for\(const[a-z_$][a-zA-Z0-9_$]*
The set is lakes. The constant is aLake. Code the first line of a for…of loop. for (const aLake of lakes) { for\(constaLakeoflakes\){
The set is planets. The constant is value. Code the first line of a for...of loop. for (const value of planets) { for\(constvalueofplanets\){
Fill in the blank to complete the first line of a loop. towns.forEach((aValue) _____ => { =>{
Fill in the blank complete the first line of a loop. The set is characters. ______((aValue) => { characters.forEach characters\.forEach
Fill in the blank complete the first line of a loop. Make up the name of the callback parameter. names.forEach __________ ((value) => { \(\([a-z_$][a-zA-Z0-9_$]*\)=>{
Code the first line of a forEach() loop. Make up the names of the set and the callback parameter. names.forEach((value) => { [a-z_$][a-zA-Z0-9_$]*\.forEach\(\([a-z_$][a-zA-Z0-9_$]*\)=>{
  1. I've coded a set. Use a for...of loop to display each value in the set in an alert.
  2. Click the Result button
  3. If you've coded correctly, three alerts will display the three values.
  4. Dismiss each alert by clicking OK.
  5. For help with this code, see Chapter 100 in the book.
  1. I've coded a set. Use a forEach() loop to display each value in the set in an alert.
  2. Click the Result button
  3. If you've coded correctly, three alerts will display the three values.
  4. Dismiss the alert by clicking OK.
  5. For help with this code, see Chapter 100 in the book.