Advertisement
Guest User

Untitled

a guest
May 6th, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. var car=new object();
  2. car.name="Mercedes Benz";
  3. car.speed=220;
  4. car.showNameAndSpeed=function(){
  5. console.log("The name of the car is " + car.name + " and the topspeed is " + car.speed());
  6. };
  7.  
  8. car.showNameAndSpeed();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement