How to solve the binary Gap problem in Javascript

Published --