Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6cd9c3e

Browse files
committed
Fixed Ex1
1 parent 2c6f17e commit 6cd9c3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Week2/homework/Masoud/js-exercises/EX1-removeTheComma.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ console.log(myString.length);
88
let changeStringToArray = [];
99
for (let i = 0 ; i < myString.length; i++){
1010
if (myString[i] == ','){
11-
changeStringToArray[i] = ' ';
11+
changeStringToArray.push(" ");
1212
} else {
13-
changeStringToArray[i] = myString[i];
13+
changeStringToArray.push(myString[i]);
1414
}
1515
}
1616

0 commit comments

Comments
 (0)