Skip To Content

Athabasca University

Section 2.1 Introduction to Scripting

Learning Objectives

After you have completed this section, you should be able to

  • list the fundamental programming elements of JavaScript.
  • write scripts using these fundamental programming constructs.

Activities

Study Questions

  1. How do you embed JavaScript in an XHTML document?
  2. Where should JavaScript be embedded?
  3. What does the document object in JavaScript refer to?
  4. How do you write to a document object?
  5. What is the difference between the write and the writeln statement in JavaScript?
  6. In JavaScript, how do you get input from a user?
  7. What does the window object in JavaScript refer to?
  8. What are the differences between the alert and the prompt dialog from the window object?
  9. How do you define variables in JavaScript?
  10. How are the types of variables decided in JavaScript?
  11. How do you convert strings to integers in JavaScript?
  12. What data types can you use in JavaScript?
  13. What arithmetic operators can you use in JavaScript?
  14. How is equality represented in JavaScript?
  15. What relational operators are provided in JavaScript?
  16. What control structures are provided for selection and repetition in JavaScript?
  17. What assignment, increment, and decrement operators are provided in JavaScript?
  18. What keywords are reserved but not used by JavaScript?

Review

Do the self-review exercises at the end of Chapter 6.

Summary

Read the Chapter 6 summary.

Updated May 06 2022 by FST Course Production Staff