DEV Community

Discussion on: Comparing Solutions: Number in Array

Collapse
 
luizjr92 profile image
Luiz Chagas Jr

Good job, maybe give Array.prototype.some a try and if the value you are looking for is not an object, you can also use Array.prototype.includes

Collapse
 
lindsayspencer profile image
Lindsay Spencer

Thank you! I'd never heard of .some before, and completely forgot about .includes. That also makes me think I should have expanded my original requirements to include any type and not just numbers. Next time! Thanks again!