How can I pass variable into an evaluate function?

I’m trying to pass a variable into a page.evaluate() function in Puppeteer, but when I use the following very simplified example, the variable evalVar is undefined. I’m new to Puppeteer and can’t find any examples to build on, so I need help passing that variable into the page.evaluate() function so I can use it inside. … Read more