The JS1k Competition Returns

The js1k competition is back. While it may have started as a joke, it continues to attract amazing entries from JavaScript ninjas eager to demonstrate their coding prowess.

The competition — code named Love ’12 — runs until midnight on March 14, 2012. There are various cash prizes for the winners and the rules remain simple:

You may submit as many entries as you like but only one submission per person will be entered in the competition.

You must provide a JavaScript code of no more than 1,024 bytes (that’s not necessarily characters).

An HTML5 page is provided which contains a single canvas tag, some set-up variables and a script tag for your code. You don’t need to use canvas or the variables although most entries do.

Minification is permitted but it must not change your original variable names.

Loading external resources, libraries, frames or other sites is forbidden. You’ll be found out so don’t bother trying!

Your code must run in the latest versions of Firefox, Chrome, Opera and Safari. Preferably, it’ll run in IE9/10 too but that’s not essential since the browsers are only available on recent editions of Windows.

Your code should behave itself, not cause crashes and behave equally well in all browsers.

The theme of “Love” is suggested but it’s not a requirement (there are far too many animated hearts already!) My favorites so far include:

Craig is a freelance UK web consultant who built his first page for IE2.0 in 1995. Since that time he's been advocating standards, accessibility, and best-practice HTML5 techniques. He's written more than 1,000 articles for SitePoint and you can find him @craigbuckler