Post History
Your logic makes sense -- the hyphen seems to join them together (a unit of if-else statements), the slash often means "or". However, the slash can also show connection between two words. (I might ...
Answer
#3: Attribution notice added
Source: https://writers.stackexchange.com/a/33560 License name: CC BY-SA 3.0 License URL: https://creativecommons.org/licenses/by-sa/3.0/
#2: Initial revision
Your logic makes sense -- the hyphen seems to join them together (a unit of if-else statements), the slash often means "or". However, the slash can also show connection between two words. (I might be typing from my home office/guest room.) In practice, I see [if-then-else](https://docs.oracle.com/javase/tutorial/java/nutsandbolts/if.html), [if/else](https://www.w3schools.com/jsref/jsref_if.asp) and [if...else](https://www.w3schools.com/js/js_if_else.asp). I'd say choose one and be consistent.