typescript check if type is number code example
Example: typescript check if string is number
let numberToCheck: string = "40";
if(!isNaN(Number(numberToCheck))) {
console.log("string is a number")
}
else {
console.log("string is NOT a number")
}