I'm trying to perform an anonymous function with a this-type argument, with the aim that an element of DOM can occupy it.
javascript: (this is dynamically created at run time)
const example = function(this) { return this }
html:
<button onclick="example(this)" ><button>
result:
Uncaught SyntaxError: Unexpected token 'this'
how can I do it?, thanks!