check NaN TS code example Example: how to check when a number varibal = nan in ts if (isNaN(number)) { number = 0; }