This file contains 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
// These are examples of prototypical inheritance found in JavaScript. | |
// ES6 Class | |
class ClassAnimal { | |
speak(){ console.log('woof') } | |
} | |
const doggie = new ClassAnimal() |
This file contains 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
const posts = [ | |
{ id: 1, likes: [] }, | |
{ id: 2, likes: ['Peter'] }, | |
{ id: 3, likes: ['John', 'Mark'] }, | |
{ id: 4, likes: ['Brian', 'Brandon', 'Kim'] }, | |
{ id: 5, likes: ['Julie', 'Jane', 'Bran', 'Jimmy'] } | |
] | |
const swagModule = () => { |
This file contains 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
0x3DE933dED53E2B94d4AF8412580858bcB2dA81Fd |
This file contains 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
0x6317a4bfb778b7cfd3eaf327bf69d7c3658c94d9 |
This file contains 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 runWithDebugger(callback, optionalArgsArray) { | |
if (arguments.length === 0){ | |
console.log('Must pass at least one argument to this function.'); | |
return; | |
} | |
debugger; | |
callback.apply(this, optionalArgsArray); | |
}; | |
function sayFullName(first, last) { |