Lesson 2 – Getting Started with JavaScript

Lecture Slides: Getting Started with JavaScript

Sample Code Files – Download

Applied Objectives

  1. Given the specification for a JavaScript application that requires only the skills presented in this chapter, code, test, and debug the application.
  2. When you test a JavaScript application with Firefox as your web browser, display any error messages in the FireFox Error Console.

Knowledge Objectives

  1. Describe two ways to include JavaScript in the head of an HTML document.
  2. List the primary rules for creating a JavaScript identifier.
  3. Describe the use of JavaScript comments, including “commenting out” portions of JavaScript code.
  4. Describe the syntax for referring to a method or property of an object.
  5. Describe the prompt and alert methods.
  6. Describe the three primitive data types used in JavaScript: numeric, string, and Boolean.
  7. Describe the rules for evaluating an arithmetic expression, including order of precedence and the use of parentheses.
  8. Describe the use of variable declarations and assignment statements.
  9. Describe the use of the \n escape sequence in a string literal.
  10. Describe the use of the parseInt and parseFloat methods.
  11. Describe the rules for evaluating a conditional expression, including the use of the isNan function, the order of precedence for logical operators, and the use of parentheses.
  12. Describe the flow of control for an if, while, or for statement.


  • Assignment #3 – Loan Calculator
    You are to build a loan calculator using HTML and Javascript. The user should be able to enter the loan amount, interest rate and the NUMBER OF YEARS that the loan will be repaid. They should also see the monthly payment, total amount of the loan (principal plus interest) and the amount of interest paid. Every time the user updates any of those fields, the monthly payment amount, total amount and amount of interest paid should automatically update.You will name the web page with your last name.

Related Videos