Question from the Javascript test

What will be the first thing that the following code displays?

Hard

What will be the** first thing** that the following code displays?

function Item() {
  this.name = 'item';
};
Item.prototype.take = function() {
  console.log('You can take' + this.name);
};

function Lantern() {
  this.name = 'lantern';
  this.light= function() {
    console.log('Light the' + this.name);
  }
};
Lantern.prototype = Object.create(Item.prototype);
Lantern.prototype.constructor = Lantern;

var lantern = new Lantern();
setTimeout(lantern.light, 1);
lantern.take();
Author: Jean-marie CléryStatus: PublishedQuestion passed 2064 times
Edit
3
Community EvaluationsNo one has reviewed this question yet, be the first!