+ 3

How to access multiple properties in an object in JavaScript

How to access multiple properties in an object in JavaScript

31st May 2018, 7:29 AM
tsx0x100
tsx0x100 - avatar
1 ответ
+ 8
obj={ name:"bob",age:5} var props= Object.getOwnPropertyNames(obj); with these you can get all the properties of obj. alert(obj); //name,age
31st May 2018, 8:22 AM
᠌᠌Code X
᠌᠌Code X - avatar