"I want my code to execute if port is 80 or 443, and http is false"
Couldn't you simply do this?:
if ((a==='80'||b==='443') && http===false) { ... }
Couldn't you simply do this?:
if ((a==='80'||b==='443') && http===false) { ... }
if (a==='80' || (b==='443'&&http===false)) {...}
I feel like I tend to use parenthesis when they are not required, but I err on the side of caution and I think it makes things more readable.
I had a thought the other day: Complicated code should look complicated. Don't try to hide your convoluted logic. In the end, someone will have to mentally unpack it into the multi-line verbose version to understand it anyway.
I feel like programmers too often try to make something complicated "pretty" -- but really this just usually has the effect of making it that much more difficult to understand.