easy JavaScript solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n/**\n * @param {number} n\n * @return {number[]}\n */\nvar evenOddBit = function(n) {\n    let s=n.toString(2).split(\'\').reverse().join(\'\');let odd,even;\n    odd=even=0;\n   for(let i=0;i<s.length;i++)\n   {\n     if(s[i]==\'1\' && i%2==0){even++;}\n     else if(s[i]==\'1\' && i%2!=0){odd++;}\n   }\n   return [even,odd] \n};\n```
['JavaScript']