title: Exporting map function into other file
body: <p>Is it possible to export the function inside the orders.map which is 'order' and import it on the other JS file with function inside? I am getting an error order is not defined. Thank you</p>
  
  <pre><code>main.js
  
       const getReport = async function() {
        const jsonlUrl = 'https://next.json-generator.com/api/json/get/xxxxx'
        const res = await fetch(jsonlUrl);
        const orders = await res.json();
  
        const orderlines = orders.map(order =&gt; ({
  
         order_id: order.order_id,
  
        customer_name: getName()
  
        }));
  
  ---
  
  function.js
  
  const getName = function() {
  const customerName = order.customer_name
   return customerName
  }
  
  </code></pre>