+ 3
How to access multiple properties in an object in JavaScript
How to access multiple properties in an object in JavaScript
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