This is not true, but I wanted to call your attention to this, because it's crucial.
setTimeout() is a fantastic function that will make crazy things.
Some cases where it is cool to use setTimeout():
* Removing classes that are tied to CSS3 animations on elements.
* Generate intentional delays on the page, after an action happens.
* Allow the browser to repaint the view before a heavy function.
When it's super NOT cool to use it:
* When something doesn't work without it because other events are overriding what you're trying to do, but throwing a setTimeout() will make sure your stuff happens after.
Why is that not cool?
Because it is a terrible pain to maintain. If you want your code to be executed with another JS event, then find that event and put it there. It will be more performant and maintainable, because we will know for sure the order in which things execute.
Best thing you can do? When you add a setTimeout(), write a comment explaining why it's necessary.