queequeg Posted July 11, 2014 Share Posted July 11, 2014 I would like to make this warning go away , hopefully by fixing some problem I have:rl.js|19| jshint warning: Redefinition of 'screen'. Here is the tutorial I'm working on: http://gamedevelopment.tutsplus.com/tutorials/how-to-make-your-first-roguelike--gamedev-13677 Here is a gist of code I'm working on from the tutorial. https://gist.github.com/5588dcb8cb44d19137e0 So my question is what is wrong? Why am I getting the above warning and how can I avoid having my linter complain? Link to comment Share on other sites More sharing options...
Dumtard Posted July 12, 2014 Share Posted July 12, 2014 The warning explains the issue pretty well, you are redefining screen. All of your variables are created globally on the window object. The window object already has a variable named screen and you are initializing a variable named screen on the window object, thus "Redefinition of 'screen'".To remove the warning change the variable name to an unused name or move it out of global scope. queequeg 1 Link to comment Share on other sites More sharing options...
Recommended Posts