Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to get array from items quantity

let qty = 10;
let numToArray = [...Array.from(Array(qty)).keys()];
//  (10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
numToArray.map(x =>{
console.log(x)
})
 
PREVIOUS NEXT
Tagged: #array #items #quantity
ADD COMMENT
Topic
Name
2+7 =