2 * Gets the index at which the first occurrence of `NaN` is found in `array`.
5 * @param {Array} array The array to search.
6 * @param {number} fromIndex The index to search from.
7 * @param {boolean} [fromRight] Specify iterating from right to left.
8 * @returns {number} Returns the index of the matched `NaN`, else `-1`.
10 function indexOfNaN(array, fromIndex, fromRight) {
11 var length = array.length,
12 index = fromIndex + (fromRight ? 0 : -1);
14 while ((fromRight ? index-- : ++index < length)) {
15 var other = array[index];
16 if (other !== other) {
23 module.exports = indexOfNaN;