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
var base = function() { | |
return { | |
baseProp: "4711", | |
sayHello: function() { | |
console.log('hi from base'); | |
}, | |
superior: function(name) { | |
var that = this, | |
method = that[name]; | |
return function () { |
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 Person() {} | |
Person.prototype.sayHello = function() { | |
console.log("Hello from Person!"); | |
}; | |
function Employee() { | |
this.sayHi = function() { | |
console.log("Hi from Employee!"); | |
} | |
} |
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 Person() {} | |
Person.prototype.sayHello = function() { | |
console.log("Hello from Person!"); | |
}; | |
var employee = Object.create(Person.prototype); | |
employee.sayHi = function() { | |
console.log("Hi from Employee!"); | |
}; |
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 Person() {} | |
Person.prototype.parts = { | |
legs: 2, | |
arms: 2 | |
} | |
var schwolf = Object.create(Person.prototype); | |
var bob = Object.create(Person.prototype); | |
console.log(schwolf.parts.legs); // output: 2 |
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 person(name) { | |
var nameLength = name.length; | |
return { | |
sayHello: () => console.log(`Hello from Person with ${nameLength} letters!`) | |
} | |
} | |
function employee(name) { | |
return Object.assign(person(name), { | |
sayHi: () => console.log("Hi from Employee!") |
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
Dec 21 21:35:37 hp systemd[1]: Stopped target Sound Card. | |
Dec 21 21:35:37 hp systemd[1]: Stopping Save/Restore Sound Card State... | |
Dec 21 21:35:37 hp systemd[1]: Stopping Daemon for power management... | |
Dec 21 21:35:37 hp systemd[1]: Stopping Authenticate and Authorize Users to Run Privileged Tasks... | |
Dec 21 21:35:37 hp mdm[1696]: DEBUG: Sending SESSPID == 0 for slave 1696 | |
Dec 21 21:35:37 hp systemd[1]: Stopping User Manager for UID 1000... | |
Dec 21 21:35:37 hp mdm[1682]: mdm[1682]: DEBUG: Got SESSPID == 0 | |
Dec 21 21:35:37 hp mdm[1696]: DEBUG: mdm_slave_session_stop: schwolf on :0 | |
Dec 21 21:35:37 hp systemd[1]: Stopped Stop ureadahead data collection 45s after completed startup. | |
Dec 21 21:35:37 hp mdm[1696]: DEBUG: mdm_slave_session_stop: Running post session script |