# Trace dataType?

**URL:** <https://forum.kirupa.com/t/trace-datatype/285834>\
**Category:** Uncategorized\
**Created:** [April 7, 2009, 5:35am UTC](https://forum.kirupa.com/t/trace-datatype/285834 "2009-04-07T05:35:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThaJock](https://avatars.discourse-cdn.com/v4/letter/t/9de0a6/32.png) [@ThaJock](https://forum.kirupa.com/u/ThaJock)\
**Post date:** [April 7, 2009, 5:35am UTC](https://forum.kirupa.com/t/trace-datatype/285834/1 "2009-04-07T05:35:03Z")

</div>

I am trying to run an if statement based on the a variables datatype

var theArray:Array = [‘element1’,‘element2’}];  
var theString:String = “I am string”;

trace(gettype(theArray));

// In php gettype() is what I use to get the type. Is there a similar function in as3?
