const shouldCancelExam = grades => {
return grades.some(grade=>{grade>=18});
}
the above gives False for shouldCancelExam([10, 12, 10, 18])
However, the below is giving the correct output which is True. What is causing the difference?
const shouldCancelExam = grades => {
return grades.some(grade=> grade>=18);
}