I could not understand why you do not need to pass the parameter name to the anonymous function inside the addEventListener. Why do you need to pass e , but not name.
I mean line 6 at the end of the line, function(e)
let btn = document.querySelector(".test-btn");
function firstFunction(e,name){
e.preventDefault();
btn.innerHTML = name;
}
btn.addEventListener("click",function(e){
firstFunction(e, "Elon");
});
nameargument is used by yourfirstFunctionmethod.