See how a minor change to your commit message style can make a difference.
Tip
Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs
var Rose = { | |
color : 'Red', | |
hasThorns : true | |
} | |
//whiteRose is child of Rose | |
var whiteRose = Object.create(Rose); | |
//both parent and child have the "color" property | |
whiteRose.color = 'White'; | |
console.log(whiteRose.color); // prints white, due to property shadowing | |
console.log(whiteRose.hasThorns); // prints true, no property shadowing |
See how a minor change to your commit message style can make a difference.
Tip
Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs
var product = { | |
price : 10, | |
increment : function(hike){ | |
this.price += hike; | |
} | |
} | |
var Vegetable = function(){ | |
this.price = 100; | |
} | |
//prototype object product will be used to set the parent of instantiated object |
//Ordinary function to be used as constructor | |
var Employee = function(name, age){ | |
this.name = name; | |
this.age = age; | |
} | |
//Instantiate an Employee object using the new keyword | |
var al = new Employee('al', 50); | |
console.log('name : ' + al.name + ' age : '); //will return name : al age : 50 |
//Object creation via Object Literal | |
//prototype chain : obj.__proto__ -> Object().__proto__ -> null | |
var obj = { a : 'a'} | |
//Function creation via Function literal | |
//prototype chain : func.__proto__->Function().__proto__->Object().__proto__->null | |
var func = function(){ | |
return 2; | |
} |
//parent and child will inherit from the Object Prototype | |
//prototype chain for parent : parent -> Object Prototype | |
var parent = { | |
name : 'Tommy', | |
species : 'dog' | |
} | |
//prototype chain for child : child -> Object Prototype | |
var child = { | |
name : 'Dexter' | |
} |
var employee = { | |
name : 'Al', | |
age : 40, | |
salary : 80000, | |
incrementSalary : function(increment){ | |
this.salary += increment | |
} | |
} |
autocomplete="off"
onto <form>
element;<input>
with autocomplete="false"
as a first children element of the form.<form autocomplete="off" method="post" action="">
<input autocomplete="false" name="hidden" type="text" style="display:none;">
...
Object().__proto__ = { | |
__defineGetter__: __defineGetter__() | |
__defineSetter__: __defineSetter__() | |
__lookupGetter__: __lookupGetter__() | |
__lookupSetter__: __lookupSetter__() | |
constructor: Object() | |
hasOwnProperty: hasOwnProperty() | |
isPrototypeOf: isPrototypeOf() | |
propertyIsEnumerable: propertyIsEnumerable() | |
toLocaleString: toLocaleString() |
/home/nick/Music: | |
AC-DC/ | |
All That Remains/ | |
Atreyu/ | |
Avenged Sevenfold/ | |
Black Tide/ | |
Creed/ | |
Crossfade/ | |
Deep Purple/ | |
Disturbed/ |