我正在做Eloquent JavaScript而且我处于相关的一部分,到目前为止, 我在这里得到了值,但不知道如何将索引放在数组上,
n00 = 76 (no squirrel, no pizza)
n01 = 9 (no squirrel, pizza)
n10 = 4 (squirrel, no pizza)
n11 = 1 (squirrel, pizza)
但我不知道如何放置它的'索引,我找到了带注释的版本,这里是:
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
所以我们的数组应该是这样的:
[76, 9, 4, 1]
这是怎么发生的?为什么20多岁?请帮助我理解,