Im new to oo concepts using javascript. From ejohn.org simple-inheritance
Standard Prototypal Inheritance
function Person(){}
function Ninja(){}
Ninja.prototype = new Person();
// Allows for instanceof to work:
(new Ninja()) instanceof Person
Statement from website over the above
What's challenging about this, though, is that all we really want is the benefits of 'instanceof', not the whole cost of instantiating a Person object and running its constructor. To counteract this we have a variable in our code, initializing, that is set to true whenever we want to instantiate a class with the sole purpose of using it for a prototype.
What does the above statement mean?
What are all the advantages of simple-inheritance by john-resig over standard prototypal inheritance?
var fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/
What is this above test for?
Can anyone explain the flow of the self-executing function? Although the code is annotated I couldn't follow the flow