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 4c03b27 commit d0371beCopy full SHA for d0371be
Sprint-3/4-stretch-investigate/find.js
@@ -20,6 +20,11 @@ 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
+// increments by 1 in every iteration using index++.
24
// b) What is the if statement used to check
25
+// checks if the character at the current index matches the specified character.
26
// c) Why is index++ being used?
27
+// It moves the pointer forward through the string. Without it, the loop would run infinitely.
28
+
29
// d) What is the condition index < str.length used for?
30
+// It ensures we don’t read beyond the string boundary — this prevents errors or undefined behavior.
0 commit comments