# Use cases

## Use case 1

```javascript
// Before
(function(){
    let x = 10; // x not available outside
})();

// Now
{
    let x = 10; // x not available outside 
}
```

## Use Case 2

```javascript
for(let i=0; i<10; i++){
    setTimeout(function(){
        console.log("number " + i);
    }, 1000);
}
```
