Possible a stupid question, but is the following code like an if statement? The only parts that confuse me are the ? and : If anyone could explain that I would be grateful. Thank you.
If the expression preceding the question mark evaluates to true then the value of the expression after the question mark is returned else the value of the expression after the colon is returned.