4/7 Why won't it work?


#1

var text = "Hi Ricky you are the Ricky man Ricky";
var myName = "Ricky";
var hits = [];

for (var i = 0; i < text.length; i++) {
if (text [i] === 'R') {

}

This is the code I am using for this section. Why won't it work?


#2

You're missing a closing bracket at the end of your code.


#3

Thank you. I can't believe I missed that