Language GuideBuilt-in TypesObjectMethodskeysOn this pagekeysGet each key of the object as an array. {a: 1, b: 2}.keys(); // ["a", "b"] Syntax keys() Returns An array containing all the keys.