here is my code:
var a=false;
var b=false;
var c=true;
var d=false;
//
var x = a ? a : (b ? b : (c ? c: false)) ;
//
for(i=0;i<11;i++){
document.write(x);
}
the inline if command check's which variable (a,b,c) is true then equal's x to that
and in the loop it will write that 10 times
there are two assumptions:
- first: it will execute if command 10 times in loop to get final value of x
- second: it will execute if command just one time just into x at first and in loop x will be just a variable containing true
which one is true?
thanks