Simple Javascript solution
\n# Complexity\n- Time complexity: O(n)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(n)\n Add your space complexity here, e.g. O(n) \n\n
\n# Complexity\n- Time complexity: $$O(n)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(n)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n/**\n * @param {number[]} nums\n * @return {boolean[]}\n */\nvar prefixesDivBy5 = function(nums) {\n    let result = [];\n    let binary = 0;\n    for(let num of nums){\n        binary = (binary % 5) * 2 + num;\n        let checkBinary = ( binary % 5 == 0);\n        result.push(checkBinary);\n    }\n    return result\n};\n```
['JavaScript']