3. Learning JavaScript

Although the title of the book explicitly calls out SVG, HTML5 Canvas, and WebGL, they wouldn’t be able to do much without the help of JavaScript. SVG, Canvas, and WebGL need JavaScript to drive the interactions between the user and the game. JavaScript also provides the basis for libraries and languages such as GWT and CoffeeScript, which are referenced later in the book. Node.js, also covered later in the book, uses JavaScript to run server-side code. In this chapter, we will cover the basics of JavaScript, along with some useful utilities and libraries that will aid in creating games, and use a JavaScript library to create your first game.

What Is JavaScript?

JavaScript is a loosely typed dynamic language that began ...

Get Learning HTML5 Game Programming: Build Online Games with Canvas, SVG, and WebGL now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.