I would like to repeat a text for 2 seconds in a while loop. How do I break the loop after 2 seconds? 

This is what I have tried so far but it doesn't work:

```
var repeat = true;
setTimeout(function() { var repeat = false }, 2000)
while(repeat) {
    console.log("Let's repeat for 2 seconds...");
}

```