my selector is not returning a value
why when i select a value it doesn't return anything
even though i did what i supposed to do
18 Replies
I'm not sure you can do this
You should do the opposite
wait this might be the solution
let me try it
oh it actually worked thank you
np
but i have a question
what if instead of using addEvent listener i used onChange
would that work too or not
Yeah but use addEventListener
@lko why it is better
Stack Overflow
addEventListener vs onclick
What's the difference between addEventListener and onclick?
var h = document.getElementById("a");
h.onclick = dothing1;
h.addEventListener("click", dothing2);
The code above re...
@lko yeah that's true
but the problem is addEvenetListener doesn't return a value
someone told me this before
I dont think onClick or onInput returns something as well
Also i dont see why yo uneed to return something inside a listener
i want to assign its value in a variable
no i mean like this
@lko this won't work right
why not
That's exactly what we just did
what
lemme try
yeah but this is different
and e.target is myFontSizes
oh
i can see