Sams Teach Yourself JavaScript in 24 Hours

Sams Teach Yourself JavaScript in 24 Hours

By Michael Moncur

Quiz

Test your knowledge of the basics of working with JavaScript by answering the following questions.

Questions

1:

What software do you use to create and edit JavaScript programs?

  1. A browser
  2. A text editor
  3. A pencil and a piece of paper
A1:

b. Any text editor can be used to create scripts. You can also use a word processor, if you're careful to save the document as a text file with the .html or .htm extension.

2:

What are variables used for in JavaScript programs?

  1. Storing numbers, dates, or other values
  2. Varying randomly
  3. Causing high-school Algebra flashbacks
A2:

a. Variables are used to store numbers, dates, or other values.

3:

What should appear at the very end of your JavaScript script?

  1. The <script LANGUAGE="JavaScript"> tag
  2. The </script> tag
  3. The END statement
A3:

b. Your script should end with the </script> tag.

Share ThisShare This

Informit Network