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