I am doing Eloquent JavaScript and i am at the part of correlation, so far, I got the values here but don't know how to place the index on an array,
n00 = 76 (no squirrel, no pizza)
n01 = 9 (no squirrel, pizza)
n10 = 4 (squirrel, no pizza)
n11 = 1 (squirrel, pizza)
but I don;t get how to place its' indexes, and i found the annotated version, here it is:
00 → 0 // Both digits are 0. 0 + 0 = 0.
01 → 1 // There’s a 1 in the 20 position. 0 + 20 = 1. - I don't get this 20s
10 → 2 // There’s a 1 in the 21 position. 21 + 0 = 2 - I don't get this
11 → 3 // There’s a 1 in both spots. 21 + 20 = 3. - I don't get this
So our array should look like this:
[76, 9, 4, 1]
How did this happen? why 20s? please help me understand,
