I have a function with an if-statement. When this if-statement is triggered I want to tell another function to clear out its array.
function firstFunction(){
if(!$myCheckBox.is(':checked')){
secondFunction(myArray.length = 0);
}
}
function secondFunction(myArray){
if(myArray.length == 0){
//Do something
}
}