Yoda condition
When you write if ("red" === color) { instead of if (color === "red") { because it reads as, “if red equals the color”, similar to the way the Star Wars character Yoda speaks.
- from
- Naming
- added
- 2026-10-10
- likes
- 0
similar
-
-
-
Regex Colorizer github.com
-
-
-
d-colorize code.dlang.org
Naming › Other: “When you write if ("red" === color) { instead of if (color === "red") { because it reads as, “if red equals the color”, similar to the way the Star Wars character Yoda speaks.”