Why isn't this function working on greasemonkey

78 views Asked by At

Why isn't this function working in greasemonkey.

function arre(){
    var index;
    var fruits = ["Banana", "Orange", "Apple", "Mango"];
    for (index = 0; index < fruits.length; index++) {
        window.alert(fruits[index]);
    }
}
1

There are 1 answers

1
VitaliyG On BEST ANSWER

You just declared the function but did not call it. Just add to the end:

arre();