Answers for "get keys objet javascript"

6

get keys objet javascript

var foo = {
  'alpha': 'puffin',
  'beta': 'beagle'
};

var keys = Object.keys(foo);
console.log(keys) // ['alpha', 'beta'] 
// (or maybe some other order, keys are unordered).
Posted by: Guest on September-02-2020
1

how to get keys in an object javascript

Object.keys(whateverYourObjectIsCalled)
Posted by: Guest on January-06-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language