# If(var == undefined) {}

**URL:** <https://forum.kirupa.com/t/if-var-undefined/197343>\
**Category:** Uncategorized\
**Created:** [August 15, 2006, 7:21pm UTC](https://forum.kirupa.com/t/if-var-undefined/197343 "2006-08-15T19:21:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![igby](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/igby/32/2060_2.png) [@igby](https://forum.kirupa.com/u/igby)\
**Post date:** [August 15, 2006, 7:21pm UTC](https://forum.kirupa.com/t/if-var-undefined/197343/1 "2006-08-15T19:21:09Z")

</div>

Is it possible to do a statement such as if(string == undefined) { }?

I’m pulling the strings from XML. I’m just trying to not have to go through and put x=" " for each empty childNodes in the XML where this variable isn’t necessary.

Thanks  
Igby
