Skip to content

compute isinteger

kgryte edited this page May 12, 2015 · 1 revision

Computes for each array element whether an element is an integer. The function returns an array with length equal to that of the input array. Each output array element is either 0 or 1. A value of 1 means that an element is an integer and 0 means that an element is not an integer.

var out = compute.isinteger( [ 2, 1/0, 'beep', 0, -4, 3.14, null, NaN ] );
// returns [ 1, 0, 0, 1, 1, 0, 0, 0 ]
Clone this wiki locally