Shall we add && operator as many as we can? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Shall we add && operator as many as we can?

4th Jul 2016, 5:47 PM
Mohamed Ashik
Mohamed Ashik - avatar
3 Answers
+ 1
yes, there is no limit! But if there is at least one element that is always false, all the expression will be evaluate at false. In the same way, if there is one element that is always true, it will have no effect on the expression and can.be removed...
5th Jul 2016, 4:02 AM
Dorian
+ 1
There is no limitation of using && operator, it's upto user choice but make sure you place it logically else you make either get a wrong answer or maybe an error.
10th Jul 2016, 11:33 AM
sachin arora
sachin arora - avatar
0
@Dorian Thanks
6th Jul 2016, 3:18 AM
Mohamed Ashik
Mohamed Ashik - avatar