79716867

Date: 2025-07-28 03:51:29
Score: 3
Natty:
Report link

Not sure why it needs to be Array.includes. If the goal here is to simply check if a variable is in an array without the type errors, why not use a for loop?

function isFruit(thing: Food) {
  for (const fruit of fruits) {
    if (fruit === thing) return true
  }
  return false
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: ryelin