Skip to content

Commit 5b6feae

Browse files
committed
docs: fix terminology - 'argument' to 'parameter' in tutorial
Fixes #8375 The tutorial incorrectly used 'argument' when referring to the function parameter in the handleClick function declaration. In JavaScript: - Parameter is the variable in the function declaration - Argument is the actual value passed when calling the function This change improves accuracy and helps learners understand the distinction between these two important programming concepts.
1 parent 40ea071 commit 5b6feae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/learn/tutorial-tic-tac-toe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ JavaScript supports [closures](https://developer.mozilla.org/en-US/docs/Web/Java
11371137
11381138
</Note>
11391139
1140-
Now you can add X's to the board... but only to the upper left square. Your `handleClick` function is hardcoded to update the index for the upper left square (`0`). Let's update `handleClick` to be able to update any square. Add an argument `i` to the `handleClick` function that takes the index of the square to update:
1140+
Now you can add X's to the board... but only to the upper left square. Your `handleClick` function is hardcoded to update the index for the upper left square (`0`). Let's update `handleClick` to be able to update any square. Add a parameter `i` to the `handleClick` function that takes the index of the square to update:
11411141
11421142
```js {4,6}
11431143
export default function Board() {

0 commit comments

Comments
 (0)