Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/pages/chapter1/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ let isEven = function (number) {

And that’s exactly how you should be writing your code. But I want the book and the code written in it to be readable by programmers at all levels. If anywhere in the book, you think there’s a better way to write the same code, don’t hold yourself back.

Returning to our discussion about even and odd numbers, let’s consider the number `0`, we know that `0` is an even number, as it is divisible by `2`, `(0/2 = 0)`. Now what we can do with `0` is use it as an anchor in the natural sequence of numbers, starting from which the even and odd numbers alternate.
Returning to our discussion about even and odd numbers. What if we aren't as smart as Euclid and don't know fancy arithmatic yet? Is there still a way to find if a number is even or odd?

Let’s consider the number `0`. We know that `0` is an even number, as it is divisible by `2`, `(0/2 = 0)`. Now what we can do with `0` is use it as an anchor in the natural sequence of numbers, starting from which the even and odd numbers alternate.

![Alternating of even and odd numbers.](7.png)

Expand Down