javascript e.keycode deprecated code example
Example: javascript e.keycode deprecated
// Use e.key instead;
document.inputDiv.addEventListener('keyup', (e) => {
console.log(e.key);
});
// Typing 'hello world' will log --> 'h' 'e' 'l' 'l' 'o' ' ' 'w' 'o' 'r' 'l' 'd';