JavaScript statics, enums, and functional inheritance

In this article I am going to show you how you can use enums and static properties in JavaScript. I am going to use a small example where Person inherits from Contact, and there is an enum that defines the two possible genders; Male, and Female. The result of running »

Using JUnit to test JavaScript

In this article I am going to show you how you can unit test your JavaScript files using nothing but JUnit. Given the following files: index.html <!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Index</title> < »

Universal Game Server with Socket.IO

In this example I will show how web clients can signal to each other using Socket.IO in both the browser, and on the server. The messages can be JavaScript objects, and can be triggered by any event you choose. Messages from other clients will be received in callback functions, »

What is JSON?

The abbreviation JSON stands for JavaScript Object Notation. It describes a way to format data that can be stored in files, or sent over the Internet. The format is almost exactly the same as the syntax for defining an object literally in JavaScript, but with a few exceptions: You cannot »

Parameterized JavaScript

Wouldn't it be nice if you could pass parameters to your JavaScript file? Well, it turns out you can. I have tested the method described here in Chrome, FireFox, InternetExplorer, and Safari. index.html <!DOCTYPE html> <html> <head> <title>Arguments Demo< »