Javascript simple solution with explanation
\nvar prefixesDivBy5 = function (A) {\n  let stv = 0;\n  return A.map((bit) => {\n    stv = stv * 2 + bit;\n\t//adding 1 binary bit means whether the number get
```\nvar prefixesDivBy5 = function (A) {\n  let stv = 0;\n  return A.map((bit) => {\n    stv = stv * 2 + bit;\n\t//adding 1 binary bit means whether the number gets doubled (if add 0) or gets doubled and plus 1 (if add 1)\n\t//Example: decimal 2 is 10 in binary. If add 0 in binary: 10 will be 100 which is 4 in decimal (the number gets doubled). If add 1 in binary: 10 will be 101 which is 5 in decimal(the number gets doubled and plus 1).\n    stv %= 5;\n\t//to prevent overflow\n    return stv == 0;\n  });\n};\n```
['JavaScript']