Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
162
rated 0 times [  164] [ 2]  / answers: 1 / hits: 23932  / 13 Years ago, tue, november 22, 2011, 12:00:00

I am new to javascript...
I trying to create an object- Flower.
Every Flower has it properties: price,color,height...



Can somebody give me an idea how to build it?



Create an object and then change his properties?



:-)


More From » javascript

 Answers
62
flower= {
price : function() {
console.log('Price is 78 $');
},
color: 'red',
height : 23
};

flower.price();
flower.height ;

[#88976] Sunday, November 20, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
destiniemartinac

Total Points: 92
Total Questions: 106
Total Answers: 111

Location: Cyprus
Member since Mon, Oct 24, 2022
2 Years ago
;