Console.logging is confusing me a bit?

I’ve been coding long enough now that I should know exactly how to do this, but a lot of the time I try to console.log() certain things and comeback with an “undefined” or an error. Any good examples of what you can and can’t log?

It’s not that you can’t log them. If it logs undefined then the thing you’re trying to log is not defined. If you’re getting an error, then there is an error in the operation you are trying to do or the way you are trying to access data. If you have examples, we can explain the error or message you’re seeing.