title: Does global variable have access inside arrow function?
body: <pre><code>productDetails = await page.$$eval(inputData.PRODUCTS_LIST, 
  productsList =&gt; productsList.map(productList =&gt; ({
                  productName : productList.querySelector('.product-details--content &gt; h3').innerText
                  }))
          )
  </code></pre>
  
  <p>inputData is the global variable. I want to use inputData.ProductName in place of '.product-details--content > h3'. But it shows inputData is undefined. </p>
  
  <p>Ex:</p>
  
  <pre><code>productDetails = await page.$$eval(inputData.PRODUCTS_LIST, 
  productsList =&gt; productsList.map(productList =&gt; ({
                  productName : productList.querySelector(inputData.PRODUCTS_NAME).innerText
                  }))
          )
  </code></pre>
  
  <p>Can anyone please to find out the mistake I'm doing and please tell the right syntax to use global variable inside the arrow function</p>