New course! Every coder should learn Generative AI!
Try a free lesson+ 1
What is && operator?
2 Answers
+ 6
&& means 'and' operator.
For example :
if (x < 20 && y > 20) ....
would mean :
If x is smaller than twenty AND y is bigger than twenty...
Other operators :
|| means 'or'
== means 'equals' (use a single = for Booleans)
< means less than (The one on the left is less than the one on the right)
> means more than (The one on the left is more than the one on the right)
=> or >= would mean more than or equals to.
<= or =< would mean less than or equals to.
!= means is 'not equals' to
+ 2
and operator