The difference between & vs && and | vs ||
之前一直搞錯,以為兩個符號就是判斷兩次。 orz
&& stops if the first operand is false and || stops if the first operand is true, while & and | always evaluate both operands
Reference : & vs && and | vs ||
Written by 小叮噹文青
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#C#
Authors
Related Tags
#c#
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#