title: How to use arrow function to alert something
body: <p>I have this image with that funcion onclick</p>
  
  <pre><code>&lt;img src="assets/images/logo.svg" id="logo" onclick="alertPlay()"&gt;
  </code></pre>
  
  <p>If I make the following function shouldn't it work?</p>
  
  <pre><code>const alertPlay =&gt; alert("play");
  </code></pre>
  
  <p>if not, maybe I'm just confused about the arrow functions in general.</p>
  
  <p>Also, isn't there a shorthand, like </p>
  
  <pre><code>&lt;img src="assets/images/logo.svg" id="logo" onclick="alert('play')"&gt;
  </code></pre>