I opened the Developer Tools in Google Chrome, pasted the following code in console and pressed Enter:
document.removeEventListener(`keypress`, a1);
document.addEventListener(`keypress`, a1);
function a1(event){
console.log(`I should have been called only once`);
}
Then I pressed some key...
Guys, I just don't get it. I don't see ANY logics here. Could you help me?
function it_makes_no_sense_whatsoever(event){
console.log(event.keyCode);
console.log(event.keyСode==37);
console.log(event.keyСode===37);
console.log(parseInt(event.keyСode)==37)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.