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