I have 1 textbar and i want to get the value from the user with Enter key on the keyboard and then a function run (the name of my function is newNote). my code is this, right?
function eventListeners(){
  document.querySelector("#note").addEventListener("keypress", function (e){
      if (e.key === "Enter"){
          newNote();
      }
  })
}