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