const clickEvent = (
function
() {
javascript
if
(
'ontouchstart'
in
document.documentElement ===
true
)
return
'touchstart'
;
else
return
'click'
;
})();
Button.addEventListener(clickEvent, e => {
console.log(
"things happened!"
)
})