This forum is now read-only. Please use our new forums! Go to forums
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
I did try using a capital “d” too.
Answer 555cca7776b8fe58b40000a6
// 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.
2 comments
for me it didn’t work
Worked for me,, Thank you Karkat
Answer 555b8ffed3292fbfe700013b
use console.log(myName) and on line 7 use myName.substring(0,2) all as I’ve said as a comment in your answer
Answer 555baf01e39efe0a7500024e
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”);
Answer 555dd641e39efea3f800048c
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).
1 comments
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);
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
4 comments
there’s no = next to console.log it should just be console.log(myName) please tell me if I was right
for the on line 7 one you must input: myName.substring(0,2)
please tell me if I was right and glad to help :D
sorry I just figured it out and came back to tell other people who are stuck and find this