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