please advice on how to check if a string ends with any integer at all in javascript. Not a specific integer.
e.g aahdhs7; //Returns true
assa4; //also returns true
Thank you
please advice on how to check if a string ends with any integer at all in javascript. Not a specific integer.
e.g aahdhs7; //Returns true
assa4; //also returns true
Thank you
try Number.isNumber()
my_str = "Hi Hello 3";
my_str1 = "Hi Hello";
console.log(Number.isInteger(parseInt(my_str.substr(-1))));
console.log(Number.isInteger(parseInt(my_str1.substr(-1))));