I understand that functions in JavaScript can take any number of arguments.
Yes
I can describe the similarity between blocks in Ruby and anonymous functions in JavaScript.
Yes
When you start working with WebPack for GameTime, you'll notice that you can't just define a variable in one file and find it in another as easily as you can in Rails.
Read Node.js, Require and Exports and Organize Your Code with RequireJS
module
?**Step One**: Watch [Sorting Algorithms in JavaScript](https://www.youtube.com/watch?v=uRyqlhjXYQI) | |
**Step Two**: Fork this gist. | |
**Step Three**: Respond to this question in your fork: "What are some of the balances and trade offs between different sorting algoritms?" | |
- Runtime (Big O) - Insertion and Bubble are slow, O(n^2). Merge is fast, O(n log n). | |
- Stability - stable sorts maintain the relative order of items with equal "values" (ex. Alex, before Adam when sorted on A). Insertion and Merge sort are stable, bubble sort is not. | |
- Implementation - none of them are that hard to implement. |
Step One: Watch Writing Testable JavaScript - Rebecca Murphey from Full Frontal 2012 (award for worst conference name ever?)
Step Two: Fork this gist.
Step Three: Consider the four responsibilities that Rebecca lists for client side code (hint: they're color coded).
Step One: Watch Mary Rose Cook Live Codes Space Invaders from Front-Trends. (The second worst conference name ever?)
Step Two: Fork this gist.
Step Three: Respond to this question in your fork: What is one approach you can take from this Mary's code and implement in your project?
The tick( ) function is something we could certainly use in building snake. That might help us sort out some of the functionality that's within our index.js. I also really liked her Keyboarder function. We could use that to hopefully clean up key event listeners to be a little dynamic and maintable when changing and adding different modes that require different keys.
Step Four: Totally Optional: take a look at some of the other forks and comment if the spirit moves you.