Passing a thunk to puppeteer's $.eval
问题 The function setValue receives a value and returns a function. Inside the second function I'm trying to console log the value of value but I get Error: Evaluation failed: ReferenceError: value is not defined My code bellow. It can be tested on try-puppeteer, just copy and paste my code and remove the require statement. const puppeteer = require('puppeteer'); (async () => { const USERNAME = 'helloworld'; const setValue = (value) => (input) => { console.log(value) }; const browser = await