Module 25 Problems:

codeyear

#1


https://www.codecademy.com/courses/getting-started-v2/4/3?curriculum_id=4f4bdd96848740000300026a


I am getting the below error message.
"Oops, try again. It looks like you didn't log your whole name to the console."
However, my code definitely is logging my whole name, up to the point that I change the var to be only the first 2 letters, which the instructions ask to do, so I am a bit confused.


Replace this line with your code. 
// On line 2, declare a variable myName and give it your name.
var myName = "Casey";
// On line 4, use console.log to print out the myName variable.
console.org = (myName);
// On line 7, change the value of myName to be just the first 2 
// letters of your name.
myName = "Ca";
// On line 9, use console.log to print out the myName variable.
console.log = myName;


#2

Check your spelling... log


#3

Yep, sorry.

I still have the same issue, though.

Here's there message I get:
"Oops, try again. It looks like you didn't log your whole name to the console."

And here's my code:
// On line 2, declare a variable myName and give it your name.
var myName = "Casey";
// 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 = "Ca";
// On line 9, use console.log to print out the myName variable.
console.log = myName;


#4

Now we get to the next problem, assigning a value to a function name.

When we write,

console.log = ___;

we overwrite the method in the current namespace. The log function no longer exists. It will be necessary to refresh the browser to start a new session and restore the method.

Like all functions, log() takes an argument.

console.log("the argument");

#5

Boom!!! Got it. Thanks. Very much appreciated.
My mess-up: "log() take an argument". As you mention this is a function. I am not defining something, but rather making an argument.... Thanks again.


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.