# (mx 6)if statement for a undefined variable

**URL:** <https://forum.kirupa.com/t/mx-6-if-statement-for-a-undefined-variable/34797>\
**Category:** flash\
**Created:** [November 6, 2003, 2:55pm UTC](https://forum.kirupa.com/t/mx-6-if-statement-for-a-undefined-variable/34797 "2003-11-06T14:55:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![t8024328](https://avatars.discourse-cdn.com/v4/letter/t/db5fbb/32.png) [@t8024328](https://forum.kirupa.com/u/t8024328)\
**Post date:** [November 6, 2003, 2:55pm UTC](https://forum.kirupa.com/t/mx-6-if-statement-for-a-undefined-variable/34797/1 "2003-11-06T14:55:57Z")

</div>

How can I test a undefined variablewith an if statement.

all a this did not work and I don’t want to define a value for this variable.  
name of the variable x.

if ((x == “”) || (x == " ") (x == Nan))  
{  
trace(“here”);  
}  
Someone could find me the correct if statemtn to check an undefined variable on action script 1, mx 6…develloped with MX2004Pro…thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 6, 2003, 4:03pm UTC](https://forum.kirupa.com/t/mx-6-if-statement-for-a-undefined-variable/34797/2 "2003-11-06T16:03:02Z")

</div>

```auto
if (!x) trace("here");

```
