Edit in JSFiddle

function Vehicle(){
   this.registration = Math.random(); 
}
function LandVehicle(){}
function Car(){}
function SportsCar(){}
function RacingCar(){}

//set up the inheritance chain
LandVehicle.prototype = new Vehicle(); 
Car.prototype         = new LandVehicle(); 
SportsCar.prototype   = new Car();
RacingCar.prototype   = new SportsCar();

var f1_ferrari = new RacingCar();
var f1_mazda   = new RacingCar();
console.log(f1_ferrari.registration); 
console.log(f1_mazda.registration);