Skip to content

compute isnumeric

kgryte edited this page May 12, 2015 · 1 revision

Computes for each array element whether an element is numeric. 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 numeric and 0 means that an element is not numeric.

var out = compute.isnumeric( [ 2, '3', 5, 4, null, NaN ] );
// returns [ 1, 0, 1, 1, 0, 0 ]
Clone this wiki locally