I am learning Javascript. I want to pass variable from one function to another. I am trying to catch option
in funTwo
but I do not want to declare the variable as global or use var
.
function funOne(one) {
let tags = '<div class= "options">' + arr[1] + '</div>';
const option = options_list.querySelectorAll(".options")
}
function funTwo(two) {
option.classList.add("correct")
}