Count Binary Substrings Hackerrank Javascript Questions