# ArrayMedian()

Calculates the Median value of items in an array.

All elements in the array must contain values that can be converted to numeric.

```
ArrayMedian( array=array );
```

**Returns:** number

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| array | array | Yes | The array of which to calculate the Median value |  |

# Examples

### Get the median value in the array

```1
aNames = array(10412,42,33,2,999,12769,888);

dump(arrayMedian(aNames));

//member function
dump(aNames.median());
```







# Categories

[Arrays](../../categories/array.md), [Math](../../categories/math.md)

# See Also

[array.median()](../objects/array/median.md)