<!doctype html>
<h1>Spiritueux Wines and Liquors</h1>
<script>
function validateEmail(){
if (email_user().indexOf('@') == -1);
alert("The email its valid .");
}
function email_user(){
var text = prompt ("What is your email?");
return text;
}
</script>
thats my code I need to validate my email
when I run the function no matter What I type It will come the email is invalid its my third day learning java
How do I do 2 functions to validate email with @ sign
and if there is not @ sign present the output has say the email is invalid
please edit my mistakes so I can see how its supposed to be
and explain me why .
Thank you for your help in advance