This is like an extension of my past question, but I'd like to expand on it further.
As the title suggests, I'm wondering if an if statement will be able to make a decisive decision when faced w/ parentheses when handling values; a bit confusing, so I'll provide code for what I mean:
local ExampleVariable = nil
local CompareNumberValue = 1
if CompareNumberValue == (ExampleVariable or 1) then -- This is what I mean
print('It worked! :O')
else
print('Didn\'t work :/')
end
In the past, and still present to this day, when you use multiple or's but don't repeat the value, it doesn't work:
local ExampleNumberValue = 0
if ExampleNumberValue == 1 or 6 or 8 then -- Obviously will fire, b/c 6 & 8 will return true, and aren't being compared to anything
print('Waah...?')
end
But w/ my raised question, will an if statement make a decisive decision when faced w/ parentheses?
EDIT
Well, just to be safe & ask, is this good practice to use? Or a good solution to some problems? And why would it as if value = var or num, the literal meaning for a sentence, instead of if value = var, then true, else num is true?

2 comments
Why ask the question if you can just try it out.. Gees people..
Well, I guess if someone else had a question similar to this, they could look up & see it.