Difference between console.log() and return

In the code above, the last output is undefined. I also saw that if I use console.log(console.log()). I get the same result. Are the two codes same? If they are same,Then why they are same? Isn’t it the work of return to return the value to where it was called from?