title: Modify variable with arrow function
body: <p>I have this following code:</p>
  <pre><code>var roomIds
  socket.on(&quot;send-rooms&quot;, (data) =&gt; {
    roomIds = Object.keys(data);
    console.log(roomIds);
  });
  console.log(&quot;this should be changed&quot;, roomIds)
  </code></pre>
  <p>How do I let the arrow function modify the variable which is declared outside of the arrow function's scope?</p>