add tests for odd_sum/even_sum
add js version