Error with 28 Conclusion Part 2


Here's my code:
if ("cheese".length <= 6) {
console.log= ("I finished my first course!");
else {
console.log= ("I suck at coding");

It gives me the error message that I did not log anything

Replace this line with your code.


= is used to assign value.

Assigning a value to a variable like this makes sense:

myVariable = "I love coding";

But, assigning a value to the console.log function, not so much. Doing this:

console.log =

replaces all of the built-in code that makes console.log work.

Fix up your code and then refresh/reload the web page to restore the console.log code to its original state.


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