Skip to content

Commit

Permalink
docs(cn): fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
QC-L authored and Qingyun Bu committed Dec 12, 2021
1 parent 9810da2 commit ee3eb28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/tutorial/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ const doubled = numbers.map(x => x * 2); // [2, 4, 6]

**[查看此步完整代码示例](https://codepen.io/gaearon/pen/EmmGEa?editors=0010)**

As we iterate through `history` array, `step` variable refers to the current `history` element value, and `move` refers to the current `history` element index. We are only interested in `move` here, hence `step` is not getting assigned to anything.
当我们遍历 `history` 数组时,`step` 变量指向的是当前 `history` 元素的值,而 `move` 则指向的是 `history` 元素的索引。此处,我们只对 `move` 感兴趣,因此未对 `step` 做任何处理。

对于井字棋历史记录的每一步,我们都创建出了一个包含按钮 `<button>` 元素的 `<li>` 的列表。这些按钮拥有一个 `onClick` 事件处理函数,在这个函数里调用了 `this.jumpTo()` 方法。但是我们还没有实现 `jumpTo()` 方法。到目前为止,我们可以看到一个游戏历史步骤的列表,以及开发者工具控制台的警告信息,警告信息如下:

Expand Down

0 comments on commit ee3eb28

Please sign in to comment.