Answer the question
In order to leave comments, you need to log in
How to pass a variable to a function handler?
we have
function one() {
var btn = document.querySelector("#reply");
var x = 7;
btn.addEventListener("click", two);
}
function two() {
console.log('как вывести икс');
console.log(x);
}
one()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question