Priceline.com Interview Question

Code some code that checks if any items in an array are greater than 10

Interview Answers

Anonymous

Aug 4, 2016

const arr = [-1,0,'hi',undefined,null,8,9,10,100,4325,231] arr.filter(item => item > 10)

Anonymous

Aug 4, 2016

True, that was basically my answer The interviewer also mentioned the .some method afterwards.

Anonymous

Mar 10, 2018

array.some(x => x > 10)