function nonRepeaters(s) {output :
var h={};
return s.split("").
map(function(c){h[c] |= 0; h[c]++; console.log(c); return c}).
filter(function(c){console.log(h[c]);return h[c] == 1}).
join("");
}
nonRepeaters("abcab")
a
b
c
a
b
2
2
1
2
2
"c"
function nonRepeaters(s) {output :
var h={};
return s.split("").
map(function(c){h[c] |= 0; h[c]++; console.log(c); return c}).
filter(function(c){console.log(h[c]);return h[c] == 1}).
join("");
}
nonRepeaters("abcab")