work the same, or is there a reason to put + i in the instructions?
(Edit: I tested the above and it returns "Your name wasn't found!" I'm trying to understand why + i is necessary in the above code.)
I've tried to learn other languages before (Python and Java), but I'd hit a wall at some point. That doesn't seem to be happening with JS. I'm sticking with it until I master it, in the hopes that it translates to understanding other languages better. A book recommendation would be welcome!
[–] [deleted] 0 points 3 points 3 points (+3|-0) ago
[–] fluffingtonthefifth [S] 0 points 1 point 1 point (+1|-0) ago (edited ago)
So in the nested for loop, could I replace the
iinj < (myName.length+i)with1? That is, wouldwork the same, or is there a reason to put
+ iin the instructions?(Edit: I tested the above and it returns "Your name wasn't found!" I'm trying to understand why
+ iis necessary in the above code.)I've tried to learn other languages before (Python and Java), but I'd hit a wall at some point. That doesn't seem to be happening with JS. I'm sticking with it until I master it, in the hopes that it translates to understanding other languages better. A book recommendation would be welcome!
[–] [deleted] 0 points 1 point 1 point (+1|-0) ago (edited ago)