I am trying to concatinate dynamically generated arrays from this site https://steam.tools/itemvalue/#/wowgoldtrader-730
in my code I select and the DOM element I need dynamically
let el = document.querySelectorAll('.price');
Helper function to convert the strings I get from the DOM nodes
function convert2Array() {
return Array.prototype.slice.call(arguments);
}
For loop to iterate over each DOM element and make it into array
for(i = 0; i < el.length; i++) {
let allPrices = []
let arr = convert2Array(el[i].innerText);
Array.prototype.concat.apply([], [arr])
console.log(arr);
}
My question is, how can I produce a single array from all the arrays that are produced so I can perform calculations on that single array?
Essentially I want to get all the arrays add them up and multiply them with x