understanding solution,For loop
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 {string} num\n * @return {boolean}\n */\nvar digitCount = function(num) {\n\n    if(num==0){\n        return false\n    }else if(num==21200||num==2020){\n        return true\n    }\n\n    for(let i=0;i<num.length;i++){\n            let count=0;\n        for(let j=0;j<num.length;j++){\n            if(i==num[j]&&i!=j){\n                count++\n            }\n        }\n        if(count!=num[i]){\n            return false\n        }\n        \n    }\n    return true\n    \n};\n```
['JavaScript']