I have an odd situation, I think...
I am writing some jquery/javascript code to validate numbers and I need to check if a given int exists within the entered number.
So for instance if the number I am checking against is 15 and the persons types in a 1, I need to check and see if that 1 exists within the 15, if it does then return true else return false.
I tried .stringOf but that of course only works on strings.
Any thoughts? Sorry if it is a super simple answer. Thanks in advance.
So far:
var Quantity = parseFloat(entered_value); // 1
var max = 15;
if(max.indexOf(Quantity) >= 0){
qty = Quantity;
}else{
qty = max;
}