6. log it


Hi brothers:

I think is finished, it prints on the screen the names...but codecademy still show me the an error:"did you remember log the result blah bla blah......."

Here is my code:

/*jshint multistr:true */

var text = "balaabl blabjalb lbja laj Maikel jasj \
Maikel ajbo lkasj oke o kik Maikel."

var myName = "Maikel"
var hits = []

for (i = 0; i < text.length; i++) {
if (text[i] === "M") {
for (var j = i; j <= myName.length+i; j++) {
if (hits.length === 0) {
console.log("Your name wasn't found");
else {


a bug in your code. Here you do it right:

console.log("Your name wasn't found");

but then for some reason 3 lines below you add a equal sign after console:


remove the equal sign. console.log is a function, you don't want it to be a variable holding a value



Have a close look at


and reset your Browser

++++ reset of session *****************
under certain circumstances you can shoot your Browser in an
inconsistent state.

Therefor it is of an advantage to know that you have 2 reset facilities:

One is the use of the F5-key which does a refresh Browser


Two, select&copy your code
Then use the Reset Code button of the course-window,
then paste your code back in.

General Notes:
Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).
CTRL 0 to reset browser zoom


thanks a lot !!! it helps me