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!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Good job, maybe give
Array.prototype.some
a try and if the value you are looking for is not an object, you can also useArray.prototype.includes
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!