Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get keys of object js

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

for ( var property in buttons ) {
  console.log( property ); // Outputs: foo, fiz or fiz, foo
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #keys #object #js
ADD COMMENT
Topic
Name
3+8 =