arnoldc
8/28/2017 - 12:13 AM

using find From https://www.packtpub.com/mapt/book/web_development/9781785285493/2/ch02lvl1sec25/references-for-javascript-array-methods

let numbers = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]; 
function multipleOf13(element, index, array) { 
  return (element % 13 == 0) ? true : false; 
} 
console.log(numbers.find(multipleOf13)); 
console.log(numbers.findIndex(multipleOf13));