[JavaScript] Beats 100% Time and Memory
Bit shift only to least significant digit to avoid overflow. Current number is divisible by 5 if LSD is 0 or 5.\n\njavascript\nvar prefixesDivBy5 = function(A) 
Bit shift only to least significant digit to avoid overflow. Current number is divisible by 5 if LSD is 0 or 5.\n\n```javascript\nvar prefixesDivBy5 = function(A) {\n  let lsd = 0;\n  return A.map((bit) => {\n    lsd <<= 1;\n    lsd += bit;\n    lsd %= 10;\n    return lsd === 0 || lsd === 5;\n  });\n};\n```
['JavaScript']