var 71828182845904523536 02875 console log var 10 if console log var p

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
var a = "2.7182818284590452353602875";
console.log (a);
var x = 10;
if (x===0){
console.log (3);
}
var y = a [x + 2];
parseInt(y);
if (y >= 5){
console.log (a.substring(0, x+1) + (parseInt(a[x+1]) +1));
}
else{
console.log (a.substring(0, x+2));
}