is this what you are comparing? console.log(counter + s.length);