JavaScript: Creating Calculations and Functions with JavaScript


Overview/Description
Web development is a skill set that increases in importance on an almost daily basis. The ability to create Web pages is the first tool required for this skill set. However, pure mark-up does have limitations: for example hypertext linking is the only interactivity a developer can offer. JavaScript can add interactivity and increased functionality to any Web site. Providing user feedback and calculating information are just a few examples of this interactivity. This course is an interactive introduction to creating in-page programs with JavaScript. The learner will gain skills to write basic scripts; store information in variables; create expressions with mathematical operators; and create and call user-defined functions.

Target Audience
This course is designed for Web developers who need to increase their developing skills. No prior experience with JavaScript or any language is necessary; however, experience with HTML and Web page development is assumed.

Expected Duration
This course, including the practice interactions, will take up to 4 hours to complete.

Objectives:

Writing a Simple JavaScript Program

  • Define JavaScript
  • View the source of a Web page
  • Define client-side script
  • Use a text editor
  • Write a Hello World script
  • Save an HTML file
  • Test JavaScript code
  • Identify the SCRIPT tag
  • Define SCRIPT tag placement
  • Define JavaScript statements
  • Create comments
  • Use external JavaScript files
  • Using Variables and Data Types

  • Define variables
  • Declare and use variables
  • Assign values to variables
  • Define variable syntax
  • Identify numeric data in variables
  • Identify string data in variables
  • Use escape characters in string data
  • Create Boolean variables
  • Define Arrays
  • Create Arrays
  • Creating Expressions with Operators

  • Add and subtract values in JavaScript
  • Concatenate strings with the addition operator
  • Multiply and divide values in JavaScript
  • Find remainders with the modulus operator
  • Increment and decrement variables
  • Use math/assignment shortcut operators
  • Define comparison operators
  • Check for equality and inequality
  • Compare value equality
  • Define logical operators
  • Evaluate with the AND operator
  • Evaluate with the OR operator
  • Negate with the NOT operator
  • Using User-defined Functions

  • Define functions
  • Declare functions
  • Define function placement
  • Define variable scope
  • Call functions
  • Nest functions
  • Creating parameters
  • Call functions with parameters
  • Create return statements for parameters

  • Course Number: WDEV0231