This forum is now read-only. Please use our new forums! Go to forums

banner
Close banner
0 points
Submitted by karkat-vantas5961
almost 9 years

It says on part 26/28 that I didn't log my full name. HELP!!

here is the code. // On line 2, declare a variable myName and give it your name. var myName = “Delton”; // On line 4, use console.log to print out the myName variable. console.log=(myName); // On line 7, change the value of myName to be just the first 2 // letters of your name. myName = “de”; // On line 9, use console.log to print out the myName variable. console.log=(myName);

Answer 555b68a2e39efe5932000414

1 vote

Permalink

I did try using a capital “d” too.

points
Submitted by karkat-vantas5961
almost 9 years

4 comments

Hans Kalsi almost 9 years

there’s no = next to console.log it should just be console.log(myName) please tell me if I was right

Hans Kalsi almost 9 years

for the on line 7 one you must input: myName.substring(0,2)

Hans Kalsi almost 9 years

please tell me if I was right and glad to help :D

karkat-vantas5961 almost 9 years

sorry I just figured it out and came back to tell other people who are stuck and find this

Answer 555cca7776b8fe58b40000a6

1 vote

Permalink

// On line 2, declare a variable myName and give it your name. var myName=”FakeName” // On line 4, use console.log to print out the myName variable. console.log(myName) // On line 7, change the value of myName to be just the first 2 // letters of your name. myName=”FakeName”.substring(0,2) // On line 9, use console.log to print out the myName variable. console.log(myName) This is the final code I used and it worked, I made this help page.

points
Submitted by karkat-vantas5961
almost 9 years

2 comments

poop12445678910 almost 9 years

for me it didn’t work

amiegibson99 almost 9 years

Worked for me,, Thank you Karkat

Answer 555b8ffed3292fbfe700013b

0 votes

Permalink

use console.log(myName) and on line 7 use myName.substring(0,2) all as I’ve said as a comment in your answer

points
Submitted by Hans Kalsi
almost 9 years

Answer 555baf01e39efe0a7500024e

0 votes

Permalink

Here just copy past this ;)

// On line 2, declare a variable myName and give it your name. var myName=”lars”; // On line 4, use console.log to print out the myName variable. console.log(myName); // On line 7, change the value of myName to be just the first 2 // letters of your name. console.log(myName .substring(0,2)); // On line 9, use console.log to print out the myName variable. console.log(“myName”);

points
Submitted by PowerBunny
almost 9 years

Answer 555dd641e39efea3f800048c

0 votes

Permalink

This is what I get an “TypeError: console.log is not a function” for:

// On line 2, declare a variable myName and give it your name. var myName = “Mirva”; // On line 4, use console.log to print out the myName variable. console.log(myName); // On line 7, change the value of myName to be just the first 2 // letters of your name. var myName = (myName.substring(0,2)); // On line 9, use console.log to print out the myName variable. console.log(myName);

It’s been doing this through the whole course and I can’t move to the next part before I get it right. I tried doing it wrong and adding “=” like this: console.log=(myName); in which case it does print the right answer on the console, but still gives an error message and stops me from moving along to the next part. I’ve checked and double checked, and I think I need someone else to tell me what the heck is happening here.

This has happened on several problems. Also in the problem 20 this gives the console-log-TypeError:

console.log(14%3); console.log(99%8); console.log(11%3);

If I do it wrong and add the “=” like this

console.log=(14%3); console.log=(99%8); console.log=(11%3);

it gives “2” as the answer (which is the result of only the last line).

points
Submitted by tridoalot
almost 9 years

1 comments

tridoalot almost 9 years

Tried this too, but still “Oops, try again”:

// On line 2, declare a variable myName and give it your name. var myName = “Mirva”; // On line 4, use console.log to print out the myName variable. console.log=(myName); // On line 7, change the value of myName to be just the first 2 // letters of your name. var myName = “Mi”; // On line 9, use console.log to print out the myName variable. console.log=(myName);

Answer 5561a517d3292f5a6c0006f6

0 votes

Permalink

in part 25/28, I cant pass because I missed a ‘ ; ‘ at the end of my code; but in part 26/28, I have to delete all the ‘ ; ‘ at the end so as to pass the session. How strange!

points
Submitted by Elaine TO
almost 9 years