JavaScript HashSet Implementation