Question: I have read the relevant pages on w3schools and other similar questions here but cannot seem to understand what's wrong about the following bit :

```
var myfunc03 = function (i) {
  document.getElementById('d01').innerHTML += 100-i+"<br>";
};

var myFunc01 = function() {
  i=0;
  while (i<100) {
    setTimeout(myfunc03(i), 1000)
    i++;
  }
};

```

when `myFunc01();` is run.

There's no pause whatsoever and all possible values for i is listed at once.

Is there a logical mistake here?

Answer: 
Yes. There are 2 problems in your code:

1. The [setTimeout](https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout) function accept a function as the first argument, but in your code, `myfunc03(i)` returns nothing
2. The while loop won't meet you needs, instead, you have to use recursive function. Since the second function should be invoked after the first timeout is fired.

Sample code:

```js
var myfunc03 = function (i) {
  setTimeout(function() {
    document.getElementById('d01').innerHTML += 100-i+"<br>";
    if (i < 100) {
      i++;
      myfunc03(i);
    }
  }, 1000);
};

var myFunc01 = function() {
  myfunc03(0);
};

myFunc01();
```

```html
<div id="d01"></div>
```
* I think you are missing a semicolon on the setTimeout and you should try passing the arguments in the below fashion:

```
setTimeout(myfunc03, 1000*i, i); 

```