JavaScript Simplified / Chapter 1 Exercises

  • Index of exercises
  • Email me

1

2

3

4

5

6

7

8

9

10

See the Pen 1-8 by A Smarter Way to Learn (@asmarterwaytolearn) on CodePen.

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.


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

0

0

0

0

Type the character that ends every statement. ; ;
Type the 2 characters that are missing in this statement. alert"You're learning JavaScript!"; () ^\(\)
In JavaScript what is this called? (1 word) "Hello!" string (s|S)tring
Make up a string. "Hello!" •.*•
The code displays a box with a message in it. Fill in the blank. alert("You won!____"); •\);
The code displays a box with a message in it. Fill in the blank. ________"You won!"); alert( alert\(
Code an alert that displays the message "Hi" alert("Hi"); alert\(•Hi•\);
Make up an alert statement displaying any message you like. alert("Good morning!"); alert\(•.*•\);
  1. Replace the asterisks with an alert that displays "Hello World!"
  2. Click the Result button (or, after revising, don't click, just wait).
  3. Wait a moment.
  4. If you've coded correctly, an alert will display the message.
  5. Dismiss the alert by clicking OK.
  6. For help with this code, see Chapter 1 in the book.
  1. Replace the asterisks with an alert that displays any message you like.
  2. Click the Result button (or, after revising, don't click, just wait).
  3. Wait a moment.
  4. If you've coded correctly, an alert will display your message.
  5. Dismiss the alert by clicking OK.
  6. For help with this code, see Chapter 1 in the book.