Java  && JavaScript Solution does not need to convert anything
There are many solutions for solving this problem and most of them are awesome. This solution based on that and just modified it to easier and cleaner\n=> Here 
There are many solutions for solving this problem and most of them are awesome. This solution based on that and just modified it to easier and cleaner\n=> Here using loop enhancement instead original loop => because we always to get the value for each index start the first to the end of the array.\n=> so we use loop enhancement just only get the values.\n=> rest of that the logic is similarly: when we move to bit => we will become original * 2: for example: \n+ we have binary 1 => is 1 ( 1 * (2 ^ 0)) => when we move bit 10 => it means that the brevious exponential will become 2 ^ 1. Similarly to other 2 ^ 2, 2 ^ 3.\nHere 1 = (1 * (2 ^ 0)) = 1 , 10 = (1 * (2^1)), 100 = (1*(2^2)), are the same 1 = 1 , 10 = 1 * 2, 100 = 4, 1000 = 8, etc.\n\n**Java**\n```\nclass Solution {\n    public List<Boolean> prefixesDivBy5(int[] nums) {\n        LinkedList<Boolean> res = new LinkedList<>();\n\t\t\n        int num = 0;\n        for(int value : nums){\n            num = (num * 2 + value) % 5;\n            res.addLast(num == 0);\n        }\n\t\t\n\t\treturn res;\n    }\n}\n```\n**JavaScript**\n```\n/**\n * @param {number[]} nums\n * @return {boolean[]}\n */\nvar prefixesDivBy5 = function(nums) {\n    var result = [];\n    const len = nums.length-1;\n\n    var num = 0;\n    for(var i = 0; i <= len; i++){\n        num = (num * 2 + nums[i]) % 5;\n        result.push(num == 0);\n    }\n    return result;\n};\n```
['Java']