loading...

re: There's no "else if" in JS VIEW POST

FULL DISCUSSION
 

You also realize it when you want to use the shorthand.
On the shorthand syntax there is no "else if". You have to write this instead:


(arg === "dog" ? "LOVELY" : (arg === "cat" ? "CUTE" : "gimme an animal"))

code of conduct - report abuse