'undefined' message when running console.log()

image

I am running Chrome Version 80.0.3987.132 (Official Build) (64-bit).

When typing in the console console.log() I get a message ‘undefined’

How can I get it to return the number as in the online editor?

Thanks,
Tamir

You mean like this,

 > console.log(1)
   1
<- undefined

The last line indicates a response from the function call, and since there is no return value, undefined is returned. This is a natural occurrence and may be ignored.

I don’t get the 1…just the undefined message

In Chrome’s console window, have a look at your settings. You have posted a screenshot in your first post. Just outside your screenshot, to the right of the Filter field, you will see a dropdown which will say something like “Default levels” or “Custom levels”. If it is set to “Default levels”, then you should be seeing your output. If you are seeing “Custom levels”, then make sure the “Info”, “Warnings” and “Errors” options are selected in the dropdown.

Exactly. If the 1 isn’t showing up, then “Info” is the one you have unchecked.

Thank you all.
I have not found the menu you’ve described but had the following

However, when running other commands whith objects that belong to another program, I still am not getting the results but only the undefined.
So…I guess I have to look for another place for settingd…

any idea?

In your screenshot look to the top right. It says default levels. It’s a drop-down menu