+ 1

How can i create JavaScript object

20th Apr 2018, 12:09 PM
Pugalenthi
2 odpowiedzi
+ 3
It's fairly simple. just create a new variable then assign it properties like below var person = { name: 'My-Name', age: '100', gender: male, } alert(person.name) for a detailed overview and understanding, check the mdn series on it. https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Basics
20th Apr 2018, 12:16 PM
Lord Krishna
Lord Krishna - avatar
+ 1
thanks a lot
20th Apr 2018, 12:17 PM
Pugalenthi