I can't figure out why this variable is becoming private to the function, even if i try to clear the interval from the console it can't find the variable, I must be doing something stupid. help please, code is below: I cut it down to the relevant parts.

```
function attack() {
  $("#container").append("<div id='attacker' style='position:absolute; width: 128px; bottom:125px'>       <img src='attacker.gif' ></div>");
  $("#attacker").css("left", $( window ).width());
  attackerCheck = setInterval( function() { moveNclear("#attacker", "attackerCheck"); }, 33 );
}

function moveNclear(objectName, intervalname) {
  objectP = $(objectName).position();
  $(objectName).css("left", (objectP.left - 10) + "px");
  if(objectP.left < 0) {
    console.log("done");
    clearInterval(intervalname);
  }
}

```