| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Yoda conditions are named so because the literal value of the condition comes first while the variable comes second.
For instance,
```js
if ("red" === color) {
// ...
}
```
Yoda condition is fixed by switching the literal and variable.
| Back | FazBrowse Home | New Git URL |
Yoda conditions are named so because the literal value of the condition comes first while the variable comes second.
For instance,
Yoda condition is fixed by switching the literal and variable.