From 30e50966ee4b8b21acb1cbeef28b5e66714cdbf2 Mon Sep 17 00:00:00 2001 From: Mary Richelle <71798304+MaryRichelle@users.noreply.github.com> Date: Sat, 18 Nov 2023 03:09:39 +0200 Subject: [PATCH] =?UTF-8?q?Fixed=20typo=20"does=20not=20initialization=20y?= =?UTF-8?q?et"=20=3D>"has=20not=20been=20initialized=20=E2=80=A6=20(#30360?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../learn/javascript/first_steps/what_is_javascript/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/learn/javascript/first_steps/what_is_javascript/index.md b/files/en-us/learn/javascript/first_steps/what_is_javascript/index.md index 983d58a19089ec1..00c9a4ecad38e31 100644 --- a/files/en-us/learn/javascript/first_steps/what_is_javascript/index.md +++ b/files/en-us/learn/javascript/first_steps/what_is_javascript/index.md @@ -163,7 +163,7 @@ function updateName() { Here we are selecting a button (line 1), then attaching an event listener to it (line 3) so that when the button is clicked, the `updateName()` code block (lines 5–8) is run. The `updateName()` code block (these types of reusable code blocks are called "functions") asks the user for a new name, and then inserts that name into the button text to update the display. If you swapped the order of the first two lines of code, it would no longer work — instead, you'd get an error returned in the [browser developer console](/en-US/docs/Learn/Common_questions/Tools_and_setup/What_are_browser_developer_tools) — `Uncaught ReferenceError: Cannot access 'button' before initialization`. -This means that the `button` object does not initialization yet, so we can't add an event listener to it. +This means that the `button` object has not been initialized yet, so we can't add an event listener to it. > **Note:** This is a very common error — you need to be careful that the objects referenced in your code exist before you try to do stuff to them.