0
Can a conditional if go inside a variable?
9 Antworten
+ 1
var x = 5;
var y = 6;
var bool = x < y;
document.write(bool);
//true
0
var x=5
var y=6
var check = (x > y): true ? false
0
all dis answers are outragious, its better u put ur ifs under d function methods
0
no you cant do that
0
var x = 100;
document.write(x);
var y=90;
var z = (x==y) ? "true" : "false";
alert(z);
0
no u cant
0
it should be called nested if
0
var x = someothervariable || "{}";
you can do something like
- 1
Variables are used to save values. Not conditionals.