title: How to write inline onclick function as es6 arrow function?
body: <p>If this is duplicate let me know, but I see similar questions for react environment but not for pure html+js.</p>
  <p>The question is, I write js function as html onclick property and it is working :</p>
  <pre><code>&lt;button onclick=&quot;function myFunction(){ alert('hi')} myFunction();&quot;&gt;Hi&lt;/button&gt;
  </code></pre>
  <p>But I can't write arrow function as html onclick prop like that :</p>
  <pre><code>&lt;button onclick=&quot;()=&gt;alert('hi')&quot;&gt;Hi&lt;/button&gt;
  </code></pre>
  <p>It is possible or not?</p>