Skip to content

Commit 3910418

Browse files
committed
Modified explanation
1 parent 9dc5687 commit 3910418

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sprint-3/3-stretch/find.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)