Skip to content

Instantly share code, notes, and snippets.

Array Prototype Methods

I understand that functions in JavaScript can take any number of arguments. 3

I can describe the similarity between blocks in Ruby and anonymous functionsin JavaScript. 3

Where are the methods available to all arrays (e.g. forEach, map, etc.) defined? 3

I can explain the difference between using a for loop and the forEach method. 3

I can explain the difference between function declarations and function expressions. 3

I can explain what the value of this is in a normal function. 3

I can explain what the value of this is when called from the context of an object. 3

I can explain how to explicitly set the value of this in a function. 3

I can explain the difference between call and apply. 3

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: Respond to this question in your fork: Consider the four responsibilities that Rebecca lists for client side code (hint: they're color coded). Respond below with your thoughts. Did any of the responsibilities that she lists surprise you? Do you feel like you mentally split your client side code in IdeaBox and other past projects into these responsibilities?

Application state surprised me.

Server v. Client was drilled into us with APIcurious and working on building out an api implementation first.

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?

Collision detection. If we just figure out left, right, up, down and diagonals. Then we can go through and figure out if it is to the right or left of something (based on the edges of two bodies).

Step Four: Totally Optional: take a look at some of the other forks and comment if the spirit moves you.

@7hoenix
7hoenix / Makefile
Created February 21, 2020 19:41 — forked from paytonrules/Makefile
A Cheat Sheet for a bunch of the stuff we did I my Makefile talk
# Basic Syntax
target: dependency dependency2 ...
command1
command2
# Note that those must BE TABs
# Setting variables
variable_name = "blah"
@7hoenix
7hoenix / README.md
Created March 21, 2024 17:53 — forked from lydell/README.md
Find unused Elm record fields

Find unused Elm record fields

This script finds some unused record fields (but not all).

First run npm ci, and then:

git grep -l '^main =' | xargs elm make --output elm.js && node find-unused-record-fields.js < elm.js