Skip to content

Commit 5e13403

Browse files
authored
Add explicit clarification that values like 0 and "" are truthy in Elixir (#13300)
1 parent 92db97e commit 5e13403

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/elixir/pages/getting-started/basic-types.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ iex> !nil
167167
true
168168
```
169169

170+
Similarly, values like `0` and `""`, which some other programming languages consider to be "falsy", are also "truthy" in Elixir.
171+
170172
## Atoms
171173

172174
An atom is a constant whose value is its own name. Some other languages call these symbols. They are often useful to enumerate over distinct values, such as:

0 commit comments

Comments
 (0)