We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c84ff52 commit 6f25d19Copy full SHA for 6f25d19
Sprint-3/revise/investigate/find.js
@@ -20,6 +20,10 @@ console.log(find("code your future", "z"));
20
// Pay particular attention to the following:
21
22
// a) How the index variable updates during the call to find
23
+/* The index variable increase by 1 in each iteration of the loop until the target character is found or the end of the string */
24
// b) What is the if statement used to check
25
+/* Checks whether the character at the current position indexis equal to the target character char */
26
// c) Why is index++ being used?
27
+/* Increment the index variable */
28
// d) What is the condition index < str.length used for?
29
+/* To ensure that the loop continues iterating through the string */
0 commit comments