Northcentral Technical College Introduction To Programming
10-152-310
Introduction to Programming with JavaScript NTC 10-152-310

Learning Plan 6 Using jsLint

# Using jsLint

#### File: /Learning Plan 6/jsLintUsage.html

### Readings

- jsLint (http://www.jslint.com/)

### Changes Learning Plan 6

- We have to make one change for Learning Plan 6. We won't be using `document.write()` anymore so we will take off the check mark labelled "Tolerate eval".

### jsLint Overview Review

- When you go to the jsLint site you an area to enter your code and a settings area with a lot of check boxes.
- Here are the steps to using jsLint.
  1. Access the site at http://www.jslint.com/
  2. Set the checkboxes in the settings area.
  3. Copy and paste your code into the top text area.
  4. Click on the button labelled `jsLint`.
  5. Fix errors and issues that jsLint finds.
  6. When you no longer get an errors box then you are done!

### jsLint Settings

- Here are the settings that match our course coding standards.

### Errors That Are OK Reminder

- Once we get to using Record Sets, you will start to see errors like this:

- This is happening because jsLint doesn't have the source code for the record set. Consequently, this error is OK and there's nothing you can do about it anyway.
- You can also add the function names to the "Predefined" text box to make the errors go away.

### Let's practice a bit.

- 6.1 Lab 5