script elements. The snippets can be copied directly into jsBin or jsFiddle or, for the most part, run using Node. In this Appendix, I’ll briefly cover the information you’ll need to run the examples successfully.
Formally, we should use unit testing for determing application state, but I’ve not found it to be as friendly or helpful as a good old print out of data. In the past, we used
alert() to print out values, but now we have the console.
All the main browsers (i.e., Internet Explorer, Firefox, Chrome, Opera, and Safari) have access to a console, as does Node. Here’s a quick cheatsheet:
console.log() all throughout the book, but there are other methods you can use. Among my other favorites are the following: