I wanted to do something in my code that if this text was equal to the text I wanted, do it, and if it was not equal, do it. Now what should I define to check if the text is the same as the text I want? As below.
function email(){
    let email = prompt('Enter your email!');
    let gmail = "@gmail.com";
    if (/* 
        Now I want to go here and check if the text has the "gmail" variable or not.
         */
        ) {
        alert('Successfully!. and your email is' + email);
    } else { 
        alert("I'm sorry. This email address is incorrect.")
    };
};
 
     
    