This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Day | Amount | |
---|---|---|
Monday | $5 | |
Tuesday | $7 | |
Wednesday | $10 | |
Thursday | $5 | |
Friday | $8 | |
Saturday | $15 | |
Sunday | $8 | |
Monthly remainder | ~$42 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Cat = function() { | |
this.name = ‘Fluffball’; | |
this.emote = ‘meow’; | |
setInterval(()=>{ | |
console.log(this.emote); | |
}, 2000) | |
}; | |
var myNewCat = new Cat(); //meow, meow, meow… every 2 seconds ad infinitum |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cat.prototype.readCollar = () => { | |
console.log(this.name); | |
//undefined at call time, 'this' is bound to the global scope | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function() { | |
} | |
//becomes | |
() => { | |
} |