Stumbled on a problem with var-s and console.log


#1

Hi everyone

So i understand how this works https://gyazo.com/f203281e4eb240da61a5b7841917b645

And I even understand how this works https://gyazo.com/ec6acebfb9d32955bbd2277f19db202c

But what confuses me is how in gods name this works https://gyazo.com/2686c35d2f492b9eeb8da134291666d8

So im thinking this magically turns Ron without ’ ’ in to a var . Is that possible and can someone explain the use for it?


#2

javascript doesn’t know what is Ron unless you say that.

so when you set var Ron=Ron and then you set myFirstName=Ron javascript knows Ron is a variable because you already told that.


#3

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