in L1224 you already trim the input result(typed = event.target.textContent.trim()), Do we need to trim again for checking here?