Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 23
    \$\begingroup\$ Nobody cares if your HTML validates at codegolf :-) Some improvements: <canvas id=c> and then c.getContext. Shorten loops: for(x=k=128;x--;)for(y=k;y--;) \$\endgroup\$ Commented Jun 9, 2012 at 15:47
  • 4
    \$\begingroup\$ ids being turned into global variables is a horrible misfeature which I refuse to acknowledge, and WebKit does not implement it in standards mode. Thank you for the loop trick. \$\endgroup\$ Commented Jun 9, 2012 at 16:53
  • 1
    \$\begingroup\$ Minor improvement: x&y?0: can be replaced with x&y|| Otherwise nice solution. \$\endgroup\$ Commented Jun 10, 2012 at 11:20
  • 5
    \$\begingroup\$ Bravo, this is just wonderful. \$\endgroup\$ Commented Jun 14, 2012 at 7:17
  • 2
    \$\begingroup\$ As this contains a script, I'd recommend titling it as HTML + Javascript. That'll make it clearer to someone skimming what sort of answer it is. \$\endgroup\$ Commented Nov 23, 2016 at 21:31