Converts all values of the specified array to int and returns the resulting array.

Parameters:
NameTypeDescription
arrArray

The array to be converted.

Since
  • 1.0.0
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 );
}