What is print, came all of sudden

Tell us what’s happening:
Describe your issue in detail here.
I am on the lesson of keyword const. I am trying to run the code as per instruction and hints but end up with error. I’m changing console.log to print.

Your code so far

const FCC = "freeCodeCamp"; // Change this line
let fact = "is cool!"; // Change this line
fact = "is awesome!";
print (FCC, fact); // Change this line

Your browser information:

User Agent is: Mozilla/5.0 (Linux; U; Android 7.1.2; en-in; Redmi Y1 Build/N2G47H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/71.0.3578.141 Mobile Safari/537.36 XiaoMi/MiuiBrowser/10.9.8-g

Challenge: Declare a Read-Only Variable with the const Keyword

Link to the challenge:

Hi @pk018146 !

Welcome to the forum!

You are receiving errors because print is not defined here

You don’t need to change it to print.
Use console.log

I think you are referring to this part of the directions and that is where the confusion is coming in
console.log should be changed to print the FCC and fact variables.

The way console.log works is that it outputs a message to the console.
It is primarily used for debugging purposes to see what your code is doing.
That is what they mean by print results to the console.

Hopefully that is clearer now

1 Like

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