본문 바로가기

카테고리 없음

TypeScript 숫자 여부 판단

반응형

public isNumeric(data : string) : boolean {  

    return !isNaN(Number(string));

}

 

qty === null

typeof qty === 'undefined'

Number.isNaN(qty)

반응형