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:

What are you waiting for? Happy coding and feel free to post a link to your submissions in the comments section below…

See also: What can YOU do with 1 Kilobyte of CSS?

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

Free Guide:

How to Choose the Right Charting Library for Your Application

How do you make sure that the charting library you choose has everything you need? Sign up to receive this detailed guide from FusionCharts, which explores all the factors you need to consider before making the decision.


No Reader comments

Learn JavaScript for free!
Free course: Introduction to JavaScript

Yours when you take up a free 14-day SitePoint Premium trial.