typescript check if string is number

Solutions on MaxInterview for typescript check if string is number by the best coders in the world

showing results for - "typescript check if string is number"
Vanessa
26 Jun 2018
1let numberToCheck: string = "40";
2
3if(!isNaN(Number(numberToCheck))) {
4	console.log("string is a number")
5}
6else {
7	console.log("string is NOT a number")
8}
similar questions
queries leading to this page
typescript check if string is number