Make binary.js more generic
Solution to largest series product exercise