New course! Every coder should learn Generative AI!
Try a free lesson+ 5
Expanding what Nasif said, if for example you have this scenario:
if (5 > 3 || 4 / 0 == 0)
You will not get a division by zero error.
Reason is that there is no point in checking the other statement because you're using the OR sign.