Hi I am trying to count the vowels of the input of the form in my HTML using javascript currently with no success.
Here is my HTML
Two problems:
1) You're missing colons after each case statement. I.e., it should be
case 'a':
case 'b': etc.
not
case 'a'
case 'b'
2) You seem to be assuming that your click event will pass the form that the button is in to the function vow. It doesn't.
Just change this:
function vow(form){
var a = form.CountVowels.value;
To:
function vow(){
var a = document.getElementById("input1").value;
Also, you should really be programming with your Console window open to see JS errors. You would have seen both of those issues.