Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

var cow = new Object(); Javascript Best Practices

149,838 views

Published on

var cow = new Object();
cow.colour = ‘white and black’;
cow.breed = ‘Holstein’;
cow.legs = 4;
cow.front = ‘moo’;
cow.bottom = ‘milk’;

is the same as
var cow = {
colour:‘white and black’,
breed:‘Holstein’,
legs:4,
front:‘moo’,
bottom = ‘milk’
};

Published in: Technology
  • Login to see the comments

×