2
Reply

what is the output if(false&&true||true&&true) { console.write("hello"); } else { console.write("welcome"); }

Anand N

Anand N

11y
1.7k
0
Reply

    step:1 First ANDing of false and true will perform and o/p will be false . Step:2 ORing of false and True will perform and o/p will be True Step 3: In final step ANDing of True and true will perform and final o/p will be Trueso if block will be execute and "hello" will print

    hello because true && true return true false&&true return false here one condition true so it show hello but when you put false&&true&&true&&true in this case you get output welcome because here i using && operator it return false