From 4ad899b909ef9cf0ce912eb5b9ee7ad302602316 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 31 Mar 2026 19:55:11 +0530 Subject: [PATCH] docs: Fix variable declaration for shouldError Declaring the `shouldError` as `const` as it is not changed but only compared to ensure good practice. --- src/content/learn/reacting-to-input-with-state.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/learn/reacting-to-input-with-state.md b/src/content/learn/reacting-to-input-with-state.md index da559dc0fac..722a61df4ac 100644 --- a/src/content/learn/reacting-to-input-with-state.md +++ b/src/content/learn/reacting-to-input-with-state.md @@ -468,7 +468,7 @@ function submitForm(answer) { // Pretend it's hitting the network. return new Promise((resolve, reject) => { setTimeout(() => { - let shouldError = answer.toLowerCase() !== 'lima' + const shouldError = answer.toLowerCase() !== 'lima' if (shouldError) { reject(new Error('Good guess but a wrong answer. Try again!')); } else {