How can I achieve an elseif in a JavaScript condition?
Just add a space:
if (...) { } else if (...) { } else { }