Answers for "get key name of object javascript"

1

get object key name in js

var buttons = {
  foo: 'bar',
  fiz: 'buz'
};

for ( var property in buttons ) {
  console.log( property ); // Outputs: foo, fiz or fiz, foo
}
Posted by: Guest on May-19-2021

Code answers related to "get key name of object javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language