File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -26,16 +26,16 @@ console.log(find("code your future", "z"));
2626
2727// b) What is the if statement used to check
2828
29- // It is used to check if the char is in the string. If it exists.. next step is to return the char.
29+ // It checks if the char is in the string. If it exists.. next step is to return the index of the char.
3030
3131
3232// c) Why is index++ being used?
3333
34- // To check if the given char is present starting from 0 till st .length.
34+ // To check if the given char is present starting from 0 till str .length.
3535
3636
3737// d) What is the condition index < str.length used for?
3838
39- // As long as index is less than the length of the string, keep looping and finding the char.
39+ // As long as index is less than the length of the string, keep looping until the char is found .
4040
4141// Added explanation to the questions.
You can’t perform that action at this time.
0 commit comments