Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var car=new object();
- car.name="Mercedes Benz";
- car.speed=220;
- car.showNameAndSpeed=function(){
- console.log("The name of the car is " + car.name + " and the topspeed is " + car.speed());
- };
- car.showNameAndSpeed();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement