. Now that being said I have issues with this code as
should be replaced with
since it is not clear if the var should exist only within that block.
Nonetheless many new JS frameworks do this style of detection to determine if a variable of their scope exists already, so as to not overwrite it. The fact that IDEA cannot see this variable ensures that I have thousands of warnings and when including dojo.js.