Skip to content
Advertisement

How to create array of objects with key & value from DOM element?

How can I create an array of objects like this?

JavaScript

JavaScript
JavaScript
JavaScript

Advertisement

Answer

You are doing it right, you need to push the elements objects into the array

JavaScript
JavaScript
JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement