I am attempting to use a switch statement in my function to count the number of elements (numbers only) in an array. However, I am uncertain about how exactly the code should be structured. This is what I have managed to come up with thus far:
<script language="JavaScript">
//array containing numbers
var numbers = [1,"o",2,3,"a",0];
//implementing a switch statement
switch (numbers) {
//I am unsure of the syntax to use here....
break;
}
//output result of the count
alert(count)
</SCRIPT>