Question: Function: counter Parameter: An array of numbers. Returns: The numbers of negative elements, zeros, and values greater than zero in the given array. You must
Function: counter
Parameter: An array of numbers.
Returns: The numbers of negative elements, zeros, and values greater
than zero in the given array.
You must use a switch statement in the function.
Write, test, and debug (if necessary) JavaScript scripts for the problem that above. When required to write a function, you must include a script to test the function with at least two different data sets. In all cases, for testing, you must write an HTML file that references the JavaScript file.
Step by Step Solution
3.35 Rating (164 Votes )
There are 3 Steps involved in it
JavaScript Program Calls a function counter for counting positivesnegatives and zeroes cons... View full answer
Get step-by-step solutions from verified subject matter experts
