This code cannot run on the last line. I am not sure why.
var Vehicle = function() {
var age = 21; //private variable
this.setAge = function(age2) {age = age2;};
this.getAge = function() {return age;};
};
var Plane = function() {};
Plane.prototype = Object.create(Vehicle.prototype);
var plane = new Plane();
console.log( plane instanceof Vehicle );
//console.log( plane.getAge() ); //TypeError: plane.getAge is not a function