Order Of Operations For Programming

This morning, I was studying Order Of Operations, and I saw on the Wikipedia page that there was a section for programming languages, too. It included most of the Boolean operators, like && (and), and || (or), etc, including < (less then) and > (more then). This wouldn’t really be noticed, unless you did something like:if(5 <= 6 && 3 == 8 || 6 && 7 == 6)Not sure if that would work, just came up with it in my head. But I think it is pretty cool how Booleans can work so much like integers in real life.

You can actually do:if(true && (true || false))Which basically means:If true and (true or false) is equal to true. A bit confusing, but the entire operation is equal to true.

Leave a Reply

Your email address will not be published. Required fields are marked *