> 
> **Possible Duplicate:**  
> 
> [setTimeout Internet Explorer](https://stackoverflow.com/questions/9568248/settimeout-internet-explorer) 
> 
> 
> 

Am I missing something here or is there a problem in Internet Explorer when passing function parameters to a [`setTimeout`](https://developer.mozilla.org/en-US/docs/DOM/window.setTimeout) calling the same function?

This will run forever in Internet Explorer:

```
function myFunction(myParam, tries){
  if (typeof tries == "undefined"){
    tries = 0;
  }
  tries++;
  if (tries < 2){
    setTimeout(myFunction, 50, myParam, tries);
  }
}
myFunction("something");

```

Is there a way to work around that problem?

<http://fiddle.jshell.net/rH3gx/>