How to make if, else if, in sambaPOS

Hi,
i have make a custom script using helper, i follow the guide from this post
Basic Auth using jscript helpers

but, i confuse how to make if, else if condition?

Here the success custom script that i’ve done
image

Hope you can help me
Thank you

The scripting engine is javascript.

if (condition) {
    //do something here
}
else if (anotherCondition) {
    //do something here
}
else {
    //do something here
}