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

7 Common mistakes in Dot Net — You can avoid

  There are many common mistakes made during .NET (ASP.NET, .NET Core) development, which affect performance, security, and code… Code Crack...