javascript - How can I get the key of my object? -
i have following object:
var text = { 'one' : 1, 'two' : 2, 'three' : 3};
i want write key 'one' console.log()
. how can it?
try:
var text = { 'one' : 1, 'two' : 2, 'three' : 3}; (var in text){ console.log(i); }
Comments
Post a Comment