> if (typeof(myVar) != 'undefined' && myVar != null) could be simplified > as: if (window.myVar != null). Is it safe? >
See by Yourself: http://jsfiddle.net/8DG63/9/ cheers,
> if (typeof(myVar) != 'undefined' && myVar != null) could be simplified > as: if (window.myVar != null). Is it safe? >
See by Yourself: http://jsfiddle.net/8DG63/9/ cheers,