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