Syntax Checking in the Script Editor

  1. Create a new Client Script
  2. Configure the trigger:
  3. Name: Lab 1.2 Syntax Checking
    Active: Not Selected
    
  4. Enter the script exactly as shown:
  5. //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);
    }
    
  6. Try to save your script. Did it save?
  7. Check the error and warning messages
  8. Correct until no errors or alerts remain
  9. Select Submit

results matching ""

    No results matching ""