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
vi ~/.bashrc | |
# [add the following] | |
# ------------------------------------------------------------- | |
. ~/.nvm/nvm.sh && nvm use default | |
# ------------------------------------------------------------- | |
mkdir ~/src | |
cd !$ |
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 Person = function () { | |
this.fname = 'douglas'; | |
this.lname = 'crockford'; | |
}; | |
var Student = function() { | |
return this; | |
}; | |
Student.prototype = new Person(); |
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 MyArray = function() { return this; } ; | |
MyArray.prototype = new Array(); | |
MyArray.prototype.constructor = MyArray; // http://stackoverflow.com/a/10430875/842214 | |
Object.defineProperty(MyArray.prototype, 'myLast', (function () { | |
return { | |
configurable : true, | |
enumerable : true, | |
get : function () { | |
return this[this.length - 1]; |
NewerOlder