www.Inmagic.com    Inmagic Forums    Inmagic Forums  Hop To Forum Categories  Scripting    Tip: use JSLint to vet javascript
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Posted
One of the toughest things about writing javascript, especially in a Textworks context, is the sheer difficulty of knowing whether the javascript is valid before you even run it.

JSLint is a javascript code quality tool at http://www.jslint.com/ that lets you copy and paste your code into a big textbox and check it for problems. It's saved my sanity many times. Nowadays I quite literally never run any Textworks javascript until it has passed a JSLint test.

N.B. JSLint will check the validity of your javascript from a syntax perspective, meaning it will catch typos, missed semicolons, mismatched brackets and whatnot. It will also warn you about potential problems and weak spots. What it cannot do is tell you whether your code will do what you think it should in a Textworks form: i.e. whether you have expressed your intent correctly.


Peter Tyrrell, MLIS
Director and Lead Developer
Andornot Consulting Inc.
http://andornot.com/about/developerblog
http://twitter.com/andornot
 
Posts: 188 | Location: Victoria, BC, Canada | Registered: Thu September 20 2001Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community  
 

www.Inmagic.com    Inmagic Forums    Inmagic Forums  Hop To Forum Categories  Scripting    Tip: use JSLint to vet javascript