# Today I Learned

Some of the things I've learned every day since Oct 10, 2016

## 119: and, or vs &&, || (Ruby)

In the Ruby programming language, the logical operators && and || have the slight variations $\texttt{and}$ and $\texttt{or}$. These plain-English operators do not behave exactly the same as their counterparts — the difference lying in their priority. While && and || have higher evaluation priority than the assignment operator $\texttt{=}$$\texttt{and}$ and $\texttt{or}$ actually have lower priority. This difference makes them useful as control-flow operators, akin to $\texttt{if}$ or $\texttt{unless}$.