// Assume the input element has an id of search
// <input type="text" id="search" />
const search = document.getElementById("search");
search.addEventListener("keyup", function (e) {
const inputText = e.target.value; // Get the text typed by user
console.log(inputText); // log the input text out
});
document.addEventListener("keyup", function(e) {
e = e || window.event;
// Add scripts here
e.keyCode; // -> returns the keycode of the key that triggered the event
e.key.toString(); // -> returns the ASCII character of the key that triggered the event
});