Thursday, 27 May 2021

how to convert object to an array in javascript

 //ES6 Object to Array

const numbers = { one: 1, two: 2, }; console.log(Object.values(numbers));
// [ 1, 2 ] console.log(Object.entries(numbers));

No comments:

Post a Comment

Meet BootUI | Scan AI-Generated Code & Find What AI Missed !

 very usefull link to verify ai content https://www.youtube.com/watch?v=pULGt0Rme58 Click