Skip to content

Commit 6e163e0

Browse files
bowbahdoeDainTrain
andcommitted
Explain backslash and forward slash
Co-Authored-By: Dain LaRock <33586731+DainTrain@users.noreply.github.com>
1 parent d704210 commit 6e163e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/strings/common_escape_sequences.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ String title = "The \"Honorable\" Judge Judy";
2121

2222
Since the backslash is used to escape characters, it too needs to escaped
2323
in order to have it be in a `String`. So to encode `¯\_(ツ)_/¯` into a String
24-
you need to escape the first backslash.
24+
you need to escape the first backslash.[^forwardslash]
2525

2626
```java
2727
~void main() {
@@ -37,3 +37,5 @@ And much the same as with `char`, you need to use `\n` to write in a newline.
3737
String letter = "To Whom It May Concern,\n\nI am writing this letter to complain.";
3838
~}
3939
```
40+
41+
[^forwardslash]: We call `\` a "backslash" and `/` a "forward slash." In `¯\_(ツ)_/¯` the left arm is drawn using the backslash and the right arm with a forward slash. What makes left "backwards" and right "forwards" is just social norms.

0 commit comments

Comments
 (0)