Javascript Reaction Game

With clean code and succinct functions

Posted on 2015-04-16 00:21:00 in webdev, javascript

This game tests your reaction time by putting various shapes in different places around the screen and timing how long it takes you to click them.

My favorite part of this project was learning the importance of terse functions, good variable names, and clear formatting. Aside from the normal satisfaction of seeing your code actually work, there is a different kind of satisfaction from seeing code that is clear cut and organized.



This is a snippet of the functions I used to make the game. I tried to make all the functions less than ten lines. Small functions, just like small legos, are more useful because they can be used in many more ways.

See it on Github