Testing for undefined var in Javascript

 

If you have a script that trow a error because of a undefined variable, simply define it or do something else because of the non-existence of it!!

if (typeof foo == 'undefined') {
    var foo = 'bar';
}

2006 - now © Philippe Archambault, made by Frog CMS

Learn about linux reseller hosting with wide channel | Team of personal injury lawyers NYC they can receive capability plus productivity in work