El primer paso para ser un buen amigo con javascript

SOURCE 6514 palabras JavaScript

Problema

arr = [1,2,3]
arr instanceof Array //=> true

function A() {}
function B() {}
A.prototype = new B();

var a = new A();
a instanceof A      //=> ?
a instanceof B      //=> ?
a instanceof Object //=> ?
























Respuesta

arr = [1,2,3]
arr instanceof Array //=> true

function A() {}
function B() {}
A.prototype = new B();

var a = new A();
a instanceof A      //=> true
a instanceof B      //=> true
a instanceof Object //=> true