News

var b= age.find(checkAdult);//It will find and return the only first value that is finded greater or equal to 18. var c= ages.findIndex(checkage);//It will find and return the index of first value ...
Examples Find the index of the last prime number in an array The following example returns the index of the last element in the array that is a prime number, or -1 if there is no prime number.