JSFiddle - React, Tailwind, and code Playground
by msfrisbie
HTML
<button>
foo
</button>
JavaScript
const o = {
qux: {}
};
console.log(Object.values(o)[0] === o.qux);
// true
console.log(Object.entries(o)[0][1] === o.qux);
// true
by msfrisbie
<button>
foo
</button>
const o = {
qux: {}
};
console.log(Object.values(o)[0] === o.qux);
// true
console.log(Object.entries(o)[0][1] === o.qux);
// true