& is bitwise.
&& is logical.
& evaluates both sides of the operation.
&& evaluates the left side of the operation, if it’s true, it continues and evaluates the right side.
& is bitwise.
&& is logical.
& evaluates both sides of the operation.
&& evaluates the left side of the operation, if it’s true, it continues and evaluates the right side.