Javascript - Héritage & assign/extend
Une petite reflexion autour de l’héritage en Javascript ES5.
Assign/Extend
Example 1-1
// one
var one = { val: 'A', fn: function(){ return this.val; } };
this.one = one;
// two
var two = Object.assign({}, one);
this.two = two;