This is an example of my code. I had like to change a value in a function, when i enter a div. So far it works that if i enter my div, i get the text output, but my value in the Example function doesnt get changed.
So basically my problem is that i dont understand how i can return a value from a function after it got changed to another function.Im pretty new to JS and cant really figure it out whats wrong.
function Example(){
var value=0;
MYDIV.addEventListener("mouseenter",function (){
value=10;
console.log("Entered the Div")
return value
})
console.log(value)
}