I am still a bit new to JavaScript. I am trying to dynamically change the title of a page through javascript. However I am getting a result of undefined
. I have tried multiple things and still no luck. What is the right way to pass a value to this anonymous function?
let email = "myemail@email.com"
await page.evaluate( (email) => document.title = email );
console.log(await page.title());