My let's arent saving when i assign a value to them : <p>I am using electron version 2.0.5 and ipcMain and ipcRenderer to pass data between my HTML and my main.js</p>

<pre><code>let fna,lna,emaila,passa;
ipcMain.on('fname', function(er, fn){
  fna = fn;
  console.log(fn)
});

console.log(fna);
</code></pre>

<p>When I test it the function runs and when the first console.log runs.
I get the right data.
But when the second one runs I get undefined...
I do not understand electron very well as I am new to it.</p>

<p>Thank you in advance.</p>
