View throttle.js
// decorator to only allow function call after the timer is done.
const throttle = (func, delay) => {
let timeout;
return function() {
const context = this;
const args = arguments;
if (!timeout) {
func.apply(context, args);
timeout = true;
setTimeout(() => timeout = false, delay);
View gist:9378003
# Intro to Prototypes
## JS Data Structures
### Outline
* Objects in Javascript?
* object literals
* properties
View Quiz_One_Coding_Answers
# Ruby_Arrays
days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
days.pop
days.unshift("Sunday")
puts days
============================================================================
Write code that would add the number 7 to "Erik's" favorite numbers.
users = {
"Jonathan" => {