My checkforZeroQuantity function is not getting called if I use it with if. Following is the sample code 

```
function myButtonClicked() {
  if (checkforZeroQuantity()) {
    alert("checked");
  }
}

function checkforZeroQuantity() {
  var x = 1;
  if (x == 0) {
    return false;
  } else {
    retrun true;
  }
}

```