Can i anyone help right now i am not able to call a variable define in global inside a nested if demo code is given below
ps: here it is working but in my actual code at this place i am getting problem

```js
var demo = "hello";

var flag ="0";

if( flag == "0"){
  console.log('sucess' + demo); // i am getting this value
  if(flag == "0"){
    console.log(demo); // not able to access here
  }
  else {
  };
}
else{
}
```