zawiera duplikat rozwiązania leetcode JavaScript

var containsDuplicate = function(nums) {
    const map = {}
    for(const num of nums) {
        // If we have seen this num before return true
        if(map[num]) return true
        map[num] = true
    }
    return false
};
Hilarious Hummingbird