Lets say if i have a multiple numbers and one is 54833928. I type into input '5483' and if i click some element i would want to show all these numbers to there. String.prototype.contains -> helped me with words, but how can i accomplish same thing with numbers. So i have like..
<div class="item" data-number="5553498"> some random text </div> <div class="item" data-number="5552134"> some random text </div> <div class="item" data-number="554325"> some random text </div> <div class="item" data-number="5555432"> some random text </div> <input type="text" placeholder="number"><span class="click_find">find</span> js - var something_obj = { "number": "empty" }; if (( number.contains(something_obj.number) || something_obj.number == 'empty') { blabla } cant get numbers with using .contains, only something_obj.number == number, but ofcourse it only gives me exact numbers, so i have to put only right number right away and if i put less numbers it returns 0.