Your second "for" loop, I am going mad


Went through a lot of topics here, didn't find similar issues with my code. Going mad, still can't find what's wrong. The message says that for loop doesn't push value to the array, tried to console.log it, no luck. Super blind..
Thanks in advance

var text = "some text Katya text text";
var myName = "Katya"; 
var hits = [];

for (var i = 0; i > text.length; i++) {
  if (text[i] === 'K') {
        for (var j = i; j < (i + myName.length); j++) {


i > text.length

did you think it should be run


such a dumb blind mistake :joy::flushed:, huge thanks


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.