79254138

Date: 2024-12-05 09:57:35
Score: 0.5
Natty:
Report link
return ARRAY.filter(x => x == SEARCH_VALUE).length > 0 ? true : false;

// For Array Object
function checkArrayItem(SEARCH_KEY, SEARCH_VALUE){
   return ARRAY.filter(x => x[SEARCH_KEY] == SEARCH_VALUE).length > 0 ? true : false;
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Rahman Qadirzade