so this is a weird thing.
I am running a puppeteer test and everything works when I console.log the count.
console.log((await page.$$('.list-view > ul > .selected > h5 > .msg-title')).length);
However, when I try to wrap the count in a variable or const, it returns undefined.
let test = await page.$$('.list-view > ul > .selected > h5 > .msg-title').length
console.log(test)
results:
undefined.
id like to eventually write this in a json format to save it to a DB.