This minified JavaScript code works just fine:
document.onkeyup=function(a){a=a||window.event;a.altKey&&121===a.which&&(my_variable=!0===my_variable?!1:!0)};
However, JSLint complains two things about it:
Unexpected ES6 feature '='
Expected '=>' and instead saw '}'
I can't determine how to edit the code to satisfy JSLint, and I'm especially curious how '=' could be an unexpected feature of ES6. Can anyone help?