Skip to content

Commit 98c6921

Browse files
Merge pull request #24 from abhibee/patch-1
Updated 07_iterables-and-looping.md
2 parents 209e101 + d56327a commit 98c6921

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ebook/07_iterables-and-looping.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ The last important difference I want to talk about is that the `for in` loop wil
110110
```javascript
111111
const fruits = ["apple","banana", "orange"];
112112

113-
fruit.eat = "gnam gnam";
113+
fruits.eat = "gnam gnam";
114114

115115
for (const fruit of fruits){
116116
console.log(fruit);
@@ -132,4 +132,4 @@ for (const index in fruits){
132132
Since `for in` will return the value and not the value itself we nee to access with the syntax `fruits[index]`.
133133

134134
As you can see, the `for in` loop returned the value of the property `eat` which we've added after initialization of the variable `fruits`.
135-
On the other hand, the `for of` loop only returned the values that were in the Array when we initialized it.
135+
On the other hand, the `for of` loop only returned the values that were in the Array when we initialized it.

0 commit comments

Comments
 (0)