Module 25 Problems:

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/getting-started-v2/4/3?curriculum_id=4f4bdd96848740000300026a

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
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;

<do not remove the three backticks above>

Check your spelling… log

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;

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");
1 Like

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.

1 Like

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