Hey so I am using puppeteer and when I run this code:
console.log(dealsId[i]);
for (var i = 0; i < sizes.length; i++) {
var refIdClasses = await sizes[i].$eval('input', a => a.getAttribute('class'));
if (refIdClasses != 'disabled') {
var refId = await sizes[i].$eval('input', a => a.getAttribute('value'));
var size = await sizes[i].$eval('input', a => a.getAttribute('data-size'));
refIds.push({ size: size, refId: refId });
}
}
console.log(dealsId[i]);
The Deals Id works before the for loop and after the loop it says undefined and I am so confused on why.