Coding with JavaScript For Dummies
Book image
Explore Book Buy On Amazon

JavaScript has more libraries, resources, and helpful tools for working with it than for any other programming language. Here are ten of the best resources for helping you write more and better JavaScript.

JSLint

JSLint

JSLint shows you where your code has problems.

JSLint, created by JavaScript super-genius Douglas Crockford, is a code checker that is designed to tell you where your code has problems — and not just the kind of problems that would generate errors.

JSLint will tell you about things that thousands of JavaScript programmers do all the time, but that are problematic for one reason or another. If your code passes JSLint’s tests, it’s probably some pretty good code.

JSFiddle.net

JSFiddle.net

JSFiddle.net is a complete JavaScript playground.

JSFiddle is an online program for running web applications in a test environment. When you go to JSFiddle.net, the first thing you see is a grid with four panes:

  • One for HTML

  • One for CSS

  • One for JavaScript

  • One for Results

Enter the appropriate type of code into any of the first three boxes and press the Run button, and the results will be displayed in the Results pane.

With JSFiddle, you can even save your fiddles and email the urls to other people to check out.

JSBin

JSBin

Collaborate with JSBin.

JSBin is a code-sharing site that allows you to write code while other people watch you. Whether you have exhibitionist tendencies, you’re teaching a junior developer, or you’re collaborating with other programmers on a project, the functionality in JSBin can be very helpful for working out bugs, getting feedback, and sharing code.

javascriptcompressor.com

javascriptcompressor.com

javascriptcompressor.com makes files smaller.

The smaller your JavaScript files are, the faster they’ll load. JavaScriptCompressor.com has a window where you can drop your JavaScript. When you press Compress, a new version that’s functionally the same as your original code, but compressed, shows up in the lower window. Not only does the compressed code take up less disk space and bandwidth, it’s also obfuscated, to hide its inner secrets from prying eyes.

jsbeautifier.org

jsbeautifier.org

Make your code prettyy.

JSBeautifier is an online tool that takes your sloppy JavaScript and makes it pretty. Some of the techniques that it uses to beautify code include

  • Inserting new lines

  • Breaking lines of chained code

  • Inserting spaces before conditional statements

  • Making indentations standard throughout the script

JavaScript RegEx generator

JavaScript RegEx generator

Point and click regular expressions.

JavaScript Lab’s JavaScript RegEx Generator is a user-friendly form for pointing and clicking your way to writing regular expressions. Simply click some buttons, enter text to match, set some options, and your regular expression shows up at the bottom.

JSONformatter

JSONformatter

The JSON formatter validates and arranges JSON data.

The JSON formatter and validator allows you to paste in unformatted JSON code, such as the code you would get from copying from the Chrome Developer Tools. It then makes the code pretty and makes sure that it’s valid.

jshint.com

jshint.com

JShint detects problems with your code as you write it.

JShint is a tool that helps you detect errors and potential problems in your JavaScript. In addition, it will give you useful information about your JavaScript code as you write it.

Mozilla Developer Network

Mozilla Developer Network

Mozilla Developer Network is one of the best JavaScript references.

The Mozilla Developer Network’s JavaScript section is an essential resource for information about everything having to do with JavaScript. Its JavaScript resources include reference material, tutorials, articles, and demos for programmers at every level.

Douglas Crockford

Douglas Crockford

Douglas Crockfords JavaScript videos.

Douglas Crockford is a hero to many JavaScript programmers. His website has a great collection of free videos on every aspect of JavaScript. These videos are essential to a programmer who is looking to move past beginner and into the more advanced levels of JavaScript expertise.

About This Article

This article is from the book:

About the book authors:

Chris Minnick is an accomplished author, trainer, and web developer who has worked on web and mobile projects for both small and major businesses. Eva Holland is an experienced writer and trainer who has designed and taught online, in-person, and video courses. They are cofounders of WatzThis?

This article can be found in the category: