# TYPEOF

**The TYPEOF function returns the data type of the input.**

This function takes a single piece of input of any [data type](../../variable-data-types/data-types-overview). It then outputs [Text](../../variable-data-types/the-text-variable-data-type) indicating the input's data type.

#### Declaration

```javascript
TYPEOF(value) -> type
```

####

#### Parameters

**value** (required, type: _any_) A value of any data type.&#x20;

#### Return Values

**type** (type: _string_) The determined [data type](../../variable-data-types/data-types-overview) of the given value, if found.

#### Examples

The following example takes the number 42 and determines that it is, in fact, a number:

```javascript
TYPEOF(42) -> "number"
```

The following example takes the list \[1, 2, 3] and determines that it is, in fact, a list:

```javascript
TYPEOF([1, 2, 3]) -> "list"
```

Regardless of the type of input TYPEOF is given, it will always return a string. This is demonstrated in the following example, where the output of one instance of the TYPEOF function is used as input in another TYPEOF function:

```javascript
TYPEOF(TYPEOF([1, 2, 3])) -> "string"
```

#### Discussion

The examples given above are far from comprehensive. For more insight into what data types the TYPEOF function might recognize, check out the [Data Types Overview](../../variable-data-types/data-types-overview). There is, however, one data type recognized by TYPEOF that is not discussed in the Data Types Overview, and that's the [AirData app object](../../working-with-data/airdata/airdata-app-objects), which TYPEOF calls an "appobject".

Say the last example has access to the following app object:

```javascript
identity -> {  
 "first_name": "Jane",  
 "last_name": "Doe",  
 "full_name": "Jane Doe",  
 "email": "j.doe@airkit.com",  
 "phone": "+13143251156",  
 "time_zone": "UTC"  
}
```

The following example gives the app object identity as input for TYPEOF, which returns "appobject":

```javascript
TYPEOF(identity) -> "appobject"
```
