Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

make object to array javascript

const array = [];
Object.entries(object).forEach(([key, value]) => array.push(value));
console.log(array) // [ 1, 2, 3 ]
Source by www.javascripttutorial.net #
 
PREVIOUS NEXT
Tagged: #object #array #javascript
ADD COMMENT
Topic
Name
4+4 =