for example: console.log here and console.log in w3school tutorial don't give same result. I don't get it.
take a look at the bottom of the page
console.log does here what document.write does there... elsewhere it says console.log is used for debugging
console.log outputs to the console but document.write outputs to the webpage. (I think) Maybe you can try it.
It is confusing for beginners. Codecademy makes it simple for beginners, by outputting
console.log() to a part on screen/webpage. While in real usage