Skip to content

Commit d3d7d55

Browse files
carstonhendersonlex111
authored andcommitted
Change 'operator' to 'method' (#2016)
I believe `.slice()` is an array prototype method, rather than an operator.
1 parent d05c83b commit d3d7d55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/tutorial/tutorial.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ Note how in `handleClick`, we call `.slice()` to create a copy of the `squares`
523523

524524
### Why Immutability Is Important {#why-immutability-is-important}
525525

526-
In the previous code example, we suggested that you use the `.slice()` operator to create a copy of the `squares` array to modify instead of modifying the existing array. We'll now discuss immutability and why immutability is important to learn.
526+
In the previous code example, we suggested that you use the `.slice()` method to create a copy of the `squares` array to modify instead of modifying the existing array. We'll now discuss immutability and why immutability is important to learn.
527527

528528
There are generally two approaches to changing data. The first approach is to *mutate* the data by directly changing the data's values. The second approach is to replace the data with a new copy which has the desired changes.
529529

0 commit comments

Comments
 (0)