HOUR 2:Creating Simple Scripts

What You’ll Learn in This Hour:

• The software tools you will need to create and test scripts

• Beginning and ending scripts

• Formatting JavaScript statements

• How a script can display a result

• Including a script within a web document

• Testing a script using browsers

• Modifying a script

• Dealing with errors in scripts

• Moving scripts into separate files

As you learned in Hour 1, “Understanding JavaScript,” JavaScript is a scripting language for web pages. You can include JavaScript commands directly in the HTML document, and the script will be executed when the page is viewed in a browser.

During this hour, you will create a simple script, edit it, and test it using a web browser. Along ...

Get Sams Teach Yourself JavaScript in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.