Skip to content

Commit 4ad899b

Browse files
authored
docs: Fix variable declaration for shouldError
Declaring the `shouldError` as `const` as it is not changed but only compared to ensure good practice.
1 parent 40ea071 commit 4ad899b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/learn/reacting-to-input-with-state.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ function submitForm(answer) {
468468
// Pretend it's hitting the network.
469469
return new Promise((resolve, reject) => {
470470
setTimeout(() => {
471-
let shouldError = answer.toLowerCase() !== 'lima'
471+
const shouldError = answer.toLowerCase() !== 'lima'
472472
if (shouldError) {
473473
reject(new Error('Good guess but a wrong answer. Try again!'));
474474
} else {

0 commit comments

Comments
 (0)