Just now,I saw some code like this:

---

```
if(condition){
    var xx='sss';   
}
//do something

if(condition){
    console.info(xx);
}

```

---

Now, I just wonder why the second `if` statement work? How can it access the `xx` variable since it is a local variable defined in another `if` statement?