Careful: your second 'for' loop should stop when it reaches its current point in the string + myName.length

var text = 'Beatae est magnam rerum nulla. Et hic qui et voluptates eaque qui. At voluptas eligendi qui ea unde. Dolore dolorem Vitaly veritatis a est laudantium facilis. Impedit quia maiores ipsam ratione eos rerum Vitaly facere. Porro praesentium ratione quia blanditiis quia voluptatem omnis et.';
var myName = 'Vitaly';
var hits = [];

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

This code works correctly at Firefox. It looks like problem with your linter...



Please what help or question do you need?

Thank you. :slight_smile:


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