I am puzzled when trying to understand the concept of "If" and "else if".
To do this correctly, do I need to place both the "If" and "else if" in the same bracket like this?
{
if (X=true)
{
//Do Something
}
else if (X=false)
{
//Do Something Else
}
}
Or will the "else if" work with whichever "if" is placed above it no matter the brackets, and ignore the "if" that is placed below it?
I'm looking forward to your reply.
Comment