I don't understand why addEventListener is not a function? you could help me :)
Error Uncaught TypeError: button.addEventListener is not a function Line: 10 that's my error but i do not not why :/ Html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> </head> <body> <script type="text/javascript" src="timer.js"> </script> <p name="time"></p> <input type="button" name="button" value=""> </body> </html> javascript const button = document.getElementsByName('button') const time = document.getElementsByName('timer') let counter = 0 const interval = setTimeout(()=>{ counter++ counter==1?time.content=`Ha pasado ${counter} minuto`: time.content=`Han pasado ${counter} minutos` },1000) button.addEventListener('click',()=>{ clearInterval(interval) console.log('Eres el dueño del tiempo') })