Dont get what i did


I'm done with this. but it was the worst lesson ever. i was basically just doing copy and paste. i didnt understand most of what i did. so if someone could kindly explain it to me?

there are no error messages. after all my inputing my syntax inputed to '[]' but before the last if statement my syntax inputed to 40. ????

var text = "My name is bibie. \
bibie has fun doing this because \
bibie wants to be a coding champ";
var myName = "bibie";
var hits = [];
for(var i = 0 ; i<text.length ; i++) {
    if(text[i] === 'b'){
        for( var j=i; j<myName.length + i;j++) {
if(hits.length = 0) {
    console.log("Your name wasnt found!");


The conditional expression needs to be a comparison. The above is an assignment where a condition belongs.

if (hits.length === 0)

As names go, grammar dictates that all proper names are capitalized. Does your teacher write your name, "bibie" or "Bibie".

When text is provided in a lesson, we need to respect that the author intended for us to use the exact phrase. The lesson checker already knows to look for it. Again, be mindful of the grammar...

"Your name wasnt found!"


"Your name wasn't found!"

Learning programming does not mean stepping away from the game. It is inter-disciplinary, meaning we must integrate other disciplines with this one. Grarmmar, spelling and following dirtections fits into this picture.


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