loading...

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

FULL DISCUSSION
 

Good point, buy maybe you should change your example so you don't use the return clause.

I feel like refactoring your example to:

function wow(arg){
  if (arg === "dog") return "LOVELY";
  if (arg === "cat") return "CUTE";

  return "gimme an animal";
}
code of conduct - report abuse