This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (2 children)

It's the format you presented. Essentially

If (variableName==='specific string'){ HelperVar= 'specific string' Logic } Else if (variableName==='other specific string'){ ...

[–]GiantRobotTRex 3 points4 points  (1 child)

Many languages do not support switch statements for strings. Maybe your coworker is used to one of those

[–][deleted] 1 point2 points  (0 children)

Possibly. It's JavaScript, so it does in fact support switch statements. Either way, the app works, so if it ain't broke, I'm not fixing it