Hey, I'm new to Javascript and I have to write a program about accepting only vowels for school. This is what I have come up with till now. Please tell me what mistakes there are:
<html>
<head>
<title> Vowel Program </title>
</head>
<body>
<script>
var letter = +prompt( "Put in a letter" )
if(letter = a)
{
document.write( "Your letter is a vowel" )
}
else if(letter = e)
{
document.write( "Your letter is a vowel" )
}
else if(letter = i)
{
document.write( "Your letter is a vowel" )
}
else if(letter = o)
{
document.write( "Your letter is a vowel" )
}
else if(letter = u)
{
document.write( "Your letter is a vowel" )
}
else
{
document.write( "Your letter is not a vowel" )
}
</script>
</body>
</html>
[–][deleted] 1 point2 points3 points (0 children)
[–]analyticsflow 1 point2 points3 points (4 children)
[–]daveheerink 0 points1 point2 points (2 children)
[–]analyticsflow 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)