I want to show the content of a txt file inside a \'div\', so I\'m calling my function with a button, but the functions triggers even if I don\'t push the button, here\'s my
The second argument to addEventListener should be a function. You're not passing a function, you're calling the function immediately and passing the result. Change to: