5/7 help


#1

// var myName = "Spencer Sempai";
var text = "Hey, how are you doing? My name is Spencer Sempai.";
var hits = [];
for(var i = 0; i < text.length; i++){
console.log(i)
if (text[i] === "S") {
var myName = "Spencer Sempai";
myName[0];
newArray = [];
newArray.push("hello");
newArray[0]; ("hello")
}
}

//can I please get some help with this??? I don't know what I'm doing wrong with this...


#2

Tell you what... Wipe the slate clean and go back to the first lesson and study the example. Then do the whole project again from scratch. Sometimes that is the best way to do things, especially now since all we will be doing is tearing your existing code to pieces. The first three lines are okay, but the rest is a nest of issues.