Traveersing the string
for ( i = 0 ; i < num . length ; i ++ ) { if ( i % 2 != 0 ) { product = product * Number ( num [ i ] ) } else { sum = sum + Number ( num [ i ] ) } } if ( product % sum == 0 ) { return true ; } else { return false ; } }