Syntax Checking in the Script Editor
- Create a new Client Script
- Configure the trigger:
Name: Lab 1.2 Syntax Checking Active: Not Selected
- Enter the script exactly as shown:
//Script used to practice Syntax Checking var peripherals = [keyboard, mouse, printer, speakers,]; var myNum = .5; for (var i=0; i < peripherals.length, i++){ alert("Current peripheral is: " + peripheral[i]); } if (myNum){ myNum++; alert("myNum" myNum); }
- Try to save your script. Did it save?
- Check the error and warning messages
- Correct until no errors or alerts remain
- Select Submit