javascript Num code example Example 1: javascript to number parseInt("1") Example 2: javascript number length var num = 1234 number.toString().length; // 4