Window Object : | SoloLearn: Learn to code for FREE!

+5

Window Object :

Is it Reliable to use "window." before all variables in JS. For example: var a = "Hello" x = console.log(a); y = console.log(window.a); How x differs from y in above code ?

10/23/2018 11:23:38 AM

Googel

2 Answers

New Answer

+3

better avoided https://stackoverflow.com/questions/11148997/window-variablename

+1

That is a bad way