Converts all values of the specified array to int and returns the resulting array.
Parameters:
Name | Type | Description |
---|---|---|
arr | Array | The array to be converted. |
- Since
- 1.0.0
- Source
Returns:
Returns a new array with all values converted to int.
- Type:
- Array
Example
import { arrayToInt } from "@gravityforms/utils";
function Example() {
let ary = [ '1', '2', '3.4' ];
let intArray = arrayToInt( ary );
}