Object literal

+2 william appiah-dankwah · March 8, 2015
Why does this code not work

Var Car = {

Van: "yellow",

Boat: function()  {

document.write("yellow bike");

}
};

Post a Reply

Replies

Oldest  Newest  Rating
+1 Samuel Oloruntoba · March 10, 2015
you need to call the objects method, example
Car.Boat();
  • 1

Javascript

107,170 followers
About

A scripting language that is added to standard HTML to create interactive effects, apps, games for the browser.

Links
Moderators