Function that return sum of the digits at odd places
function sum_odd ( n ) { let sum = 0 , pos = 1 ; while ( n ) { if ( pos % 2 == 1 ) sum += n % 10 ; n = Math . floor ( n / 10 ) ; pos ++ ; } return sum ; }