Min Bitwise Array - JS
javascript []\n/**\n * @param {number[]} nums\n * @return {number[]}\n */\nvar minBitwiseArray = function(nums) {\n    ans = []\n    for (let i = 0; i < nums.le
```javascript []\n/**\n * @param {number[]} nums\n * @return {number[]}\n */\nvar minBitwiseArray = function(nums) {\n    ans = []\n    for (let i = 0; i < nums.length; i++) {\n        for (let j = 1; j < nums[i]; j++) {\n            if ((j | (j + 1)) == nums[i]) {\n                ans.push(j)\n                break\n            }\n        }\n        if (!ans[i]) ans.push(-1)\n    }\n\n    return ans\n};\n```
['JavaScript']