You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if generally has the form [condition1, value1, condition2, value2, ...] and the first condition to be truthy returns the associated value, and if no conditions match null is returned.
There is a special case with an odd number of arguments [condition1, value1, condition2, value2, value_else] where the value_else is returned if none of the previous conditions match.
When an if statement doesn't match on any of it's conditions, it returns all arguments instead of
nil
as expected:Background
if
generally has the form[condition1, value1, condition2, value2, ...]
and the first condition to be truthy returns the associated value, and if no conditions match null is returned.There is a special case with an odd number of arguments
[condition1, value1, condition2, value2, value_else]
where the value_else is returned if none of the previous conditions match.The text was updated successfully, but these errors were encountered: