in an if statement is there an OR condition?

lets say i need to make the condition

if{x<5 or x>8}{stuff;}

is there an “or” condition and if not what would be the simplest what to achieve the above?

If you use two pipes it will skip the second condition if the first condition is true.

En example of why this helps is checking if a string is null or empty like this:

if ( ! someString  ||  someString.length == 0 ) {
	print("someString is junk");
}

If you only used one pipe, the above would throw a null pointer exception (or something like that) because you can’t access the length of a null string.

The same distinction exists between the & and && operators.

wow
if(x<5||x>8) {stuff;}

if(x <= 5 || x >= 0) print(“OR”);

– David