I saw somewhere else said,
x && foo();
is equal to
if(x){
foo();
}
I tested it and they really did the same thing.
But why? What exactly is x && foo()?
I saw somewhere else said,
x && foo();
is equal to
if(x){
foo();
}
I tested it and they really did the same thing.
But why? What exactly is x && foo()?