Challenges • Asked over 6 years ago by rudebowski
For the detect substring in a string problem, here was the solution offered:
function detectSubstring(str, subStr) {
let idxOfStart = 0,
j = 0;
for (i = 0; iHey rudebowski,
The point of the exercise was to avoid using the substring method, and to come up with it on your own. I'll edit the challenge to make that clearer!