Skip to content

Commit 331f7e3

Browse files
authored
docs: fix terminology - 'argument' to 'parameter' in tutorial (#8376)
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 d013b51 commit 331f7e3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ JavaScript supports [closures](https://developer.mozilla.org/en-US/docs/Web/Java
11381138
11391139
</Note>
11401140
1141-
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:
1141+
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:
11421142
11431143
```js {4,6}
11441144
export default function Board() {

0 commit comments

Comments
 (0)