How to keep the scope when calling setTimeout/setInterval in JavaScript

```javascript // Don't loose our scope var self = this; // Closures to the rescue setTimeout(function() { self.hide() }, 500); ```