function checkOnEnter(event) {
    if(event.key === "Enter") {
        event.preventDefault();
        //grab input
        let userInput = codeInput.value.trim().toLowerCase();
        //check if input is correct
        checkCode(userInput);
    };
}
//allow enter or return key to input code
allow enter or return key to input code
allow enter or return key to input code
function checkOnEnter(event) {
    if(event.key === "Enter") {
        event.preventDefault();
        let userInput = codeInput.value.trim().toLowerCase();
        checkCode(userInput);
    };
}
function checkOnEnter ( event ) { if ( event . key === "Enter" ) { event . preventDefault ( ) ; let userInput = codeInput . value . trim ( ) . toLowerCase ( ) ; checkCode ( userInput ) ; } ; }
allow enter or return key to input code
allow enter or return key to input code
//grab input //check if input is correct