title: How do I get an array out of a function?
body: <p>I am using eel in python to run a html frontend and want to display a graph with data from python. For this I need to get my data, which I already formated for js in python. (I don't have a lot of experience with js)</p>
  
  <p>I can't figure out a way to define chart0 globably and then manipulate it in a function and keep the changes.
  I can't use return because I call this function from python with the data, that I want to end up in js.</p>
  
  <pre><code>let chart0 = [];
  eel.expose(get_chart0);
  function get_chart0(ch0){
    chart0 = ch0;
    console.log(chart0); // --&gt; correct output
  }
  console.log(chart0); // --&gt; empty
  </code></pre>