javascript take first 2 characters of int code example
Example 1: javascript 1 + "1"
console.log(10+"1"); //101
console.log(10-"1"); //9
Example 2: javascript count digits
var length = (number + '').replace('.', '').replace('-', '').length; // for numbers that can be floats or negatives