For example if the number 752 contains the number 5? Whats the best way to check? Convert to string or divide into individual digits?
Convert to string and use indexOf
(752+'').indexOf('5') > -1
console.log((752+'').indexOf('5') > -1); console.log((752+'').indexOf('9') > -1);
1.4m articles
1.4m replys
5 comments
57.0k users