Java&JS&TS Solution (JW)
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```java []\npublic int maxDivScore(int[] nums, int[] divisors) {\n    int maxScore = -1;\n    int resultDivisor = Integer.MAX_VALUE;\n\n    // Iterate through each divisor\n    for (int divisor : divisors) {\n        int score = 0;\n\n        // Calculate the divisibility score for the current divisor\n        for (int num : nums) {\n            if (num % divisor == 0) {\n                score++;\n            }\n        }\n\n        // Update the result if the current divisor has a higher score,\n        // or if the score is the same but the divisor is smaller\n        if (score > maxScore || (score == maxScore && divisor < resultDivisor)) {\n            maxScore = score;\n            resultDivisor = divisor;\n        }\n    }\n\n    return resultDivisor;\n}\n```\n```javascript []\nvar maxDivScore = function(nums, divisors) {\n    let maxScore = -1;\n    let resultDivisor = Infinity;\n\n    // Iterate through each divisor\n    for (let divisor of divisors) {\n        let score = 0;\n\n        // Calculate the divisibility score for the current divisor\n        for (let num of nums) {\n            if (num % divisor === 0) {\n                score++;\n            }\n        }\n\n        // Update the result if the current divisor has a higher score,\n        // or if the score is the same but the divisor is smaller\n        if (score > maxScore || (score === maxScore && divisor < resultDivisor)) {\n            maxScore = score;\n            resultDivisor = divisor;\n        }\n    }\n\n    return resultDivisor;\n};\n```\n```typescript []\nfunction maxDivScore(nums: number[], divisors: number[]): number {\n    let maxScore = -1;\n    let resultDivisor = Infinity;\n\n    // Iterate through each divisor\n    for (let divisor of divisors) {\n        let score = 0;\n\n        // Calculate the divisibility score for the current divisor\n        for (let num of nums) {\n            if (num % divisor === 0) {\n                score++;\n            }\n        }\n\n        // Update the result if the current divisor has a higher score,\n        // or if the score is the same but the divisor is smaller\n        if (score > maxScore || (score === maxScore && divisor < resultDivisor)) {\n            maxScore = score;\n            resultDivisor = divisor;\n        }\n    }\n\n    return resultDivisor;\n};\n```
['Array', 'Java', 'TypeScript', 'JavaScript']