If-else syntax in MLQ4

Hello,

Syntax 1 :

if (condition1)
{
    // Code block executed if condition1 is true
}
else if (condition2)
{
    // Code block executed if condition2 is true
}
else
{
    // Code block executed if none of the conditions are true
}

Syntax 2 :

if (condition1)
{
    // Code block executed if condition1 is true
}
else 
{
if (condition2) 
{
    // Code block executed if condition2 is true
}
}
else
{
    // Code block executed if none of the conditions are true
}

To what purpose is this? Are you trying to figure out a program?