Class object into an array of an array
let arrayLike = { '0': 'a', '1': 'b', '2': 'c', length: 3 }; let arr = Array.from(arrayLike) arr.forEach(el=>console.log(el))
Output Results: [a, b, c], to be noted that, length not less
Class object into an array of an array
let arrayLike = { '0': 'a', '1': 'b', '2': 'c', length: 3 }; let arr = Array.from(arrayLike) arr.forEach(el=>console.log(el))
Output Results: [a, b, c], to be noted that, length not less