View gist:474bd5ccf8eda33b0bb53ac82f9a593f
0x93b3a6911d0aa841952f51c3a823dde54798eaeb |
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" => { |