Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

60%
+1 −0
Q&A Terminology question - "if-else" or "if/else"?

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 ...

posted 7y ago by Sharon M‭  ·  last activity 5y ago by System‭

Answer
#3: Attribution notice added by user avatar System‭ · 2019-12-08T08:04:02Z (about 5 years ago)
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 by user avatar Sharon M‭ · 2019-12-08T08:04:02Z (about 5 years ago)
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.

#1: Imported from external source by user avatar System‭ · 2018-01-31T14:47:22Z (almost 7 years ago)
Original score: 1