Returns the value that corresponds to the first true condition. This can be used as an alternative to multiple nested if() statements.
Syntax
ifs(condition, ifTrue, condition2, ifTrue2, ..., else)
ifs(
1 + 1 == 1, 1,
1 + 1 == 2, 2,
3
)
ifs(
/* Check if 1 + 1 equals 1, and if it does display 1 */
1 + 1 == 1, 1,
/* Otherwise check if 1 + 1 equals 2, and if it does display 2 */
1 + 1 == 2, 2,
/* Otherwise display 3 */
3
)