I would like the function test to get the input from the user and display the like the counter function and to display if it passed or not.

var negatives =0;
var zeroes =0;
var positives=0 ;
function counter(array){

var i=0;
for(i=0;i<array.length;i++)
{
switch (true )
{
case (array[i] == 0) :
zeroes++;
break;
case (array[i] > 0) :
positives ++;
break;
case (array[i] < 0) :
negatives ++;
break;

}
}
return "Negatives = "+negatives+"\nZeroes = "+zeroes+"\nPositives = "+positives;
}
function show_prompt(){

var myIntArray = new Array(10);
var i=0;
for(i=0;i<10;i++){
var num = prompt("Please enter a number","Please enter a number");
myIntArray[i] = parseInt(num);
}
var output = counter(myIntArray);
alert (output);
}
function test() {
var myIntArray = new Array(3);
myIntArray [0]=-1;
myIntArray [1]=0;
myIntArray [2]=1;
counter(myIntArray);
if(zeroes ==1 && positives ==1 && negatives ==1) {
alert('Test passed');
}
else alert('Test Failed');
}

To create the `test()` function that checks if the `counter()` function passes or fails, you can follow these steps:

1. Start by declaring the `test()` function:

```javascript
function test() {
// ...
}
```

2. Create an array `myIntArray` with the test inputs:

```javascript
var myIntArray = new Array(3);
myIntArray[0] = -1;
myIntArray[1] = 0;
myIntArray[2] = 1;
```

3. Call the `counter()` function with the test inputs:

```javascript
counter(myIntArray);
```

4. Check if the counters (`zeroes`, `positives`, `negatives`) match the expected values:

```javascript
if (zeroes == 1 && positives == 1 && negatives == 1) {
alert('Test passed');
} else {
alert('Test failed');
}
```

5. Complete the `test()` function as shown below:

```javascript
function test() {
var myIntArray = new Array(3);
myIntArray[0] = -1;
myIntArray[1] = 0;
myIntArray[2] = 1;
counter(myIntArray);
if (zeroes == 1 && positives == 1 && negatives == 1) {
alert('Test passed');
} else {
alert('Test failed');
}
}
```

Now, you can call the `test()` function to check if the `counter()` function passes or fails.