I used the push
command and printed the array before using the pop
command, but it is not applied and is gone
var a={
arr:[],
boolean:true,
test:function(){
if(a.boolean){
a.arr.push(1);
console.log(a.arr);
}
if(a.boolean)
a.arr.pop();
}
}