From 0ab8a03e931e60a4d584bd0258babedc0ac94ce3 Mon Sep 17 00:00:00 2001 From: Lutz Rosema Date: Wed, 26 Oct 2016 16:20:09 +0200 Subject: [PATCH] Use `const` instead of `var` (#8107) It clarifies that `history` and `current` won't be reassigned. --- tutorial/tutorial.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorial/tutorial.md b/tutorial/tutorial.md index 4cb5438b..180ba05e 100644 --- a/tutorial/tutorial.md +++ b/tutorial/tutorial.md @@ -386,8 +386,8 @@ Its `handleClick` can push a new entry onto the stack by concatenating the new h ```javascript handleClick(i) { - var history = this.state.history; - var current = history[history.length - 1]; + const history = this.state.history; + const current = history[history.length - 1]; const squares = current.squares.slice(); if (calculateWinner(squares) || squares[i]) { return;