JSFiddle - React, Tailwind, and code Playground

by piyushpranjal

JavaScript

const obj = {
  x: 1,
  y: 2,
  z: 3,
};

let a = [],
  i = 0;
for (a[i++] in obj) ;

console.log(a);