Codewars challenge - pair of shoes
Convert your test values where you need them

Your initial for loop only sets each "right / left" value to -1 if it is 0. This can be done in the reduce function itself. Also, your conditional p[c[1]] != undefined is unnecessary, as undefined evaluates to false, and there is no concern here about other "falsy" values such as zero.

Use Javascript's array methods


.some() can eliminate unnecessary for loops with conditionals in Javascript.
.values() lets you concisely iterate through values of an object.


Combined with the arrow operator =&gt;, these can result in concise code that reads a little more like a natural sentence.

Applying both of the above points to your code:

shoes = [[0, 21], 
         [1, 23], 
         [1, 21], 
         [0, 23]];

function pairOfShoes(shoes) {
    var p = shoes.reduce(function(p, c) {
        p[c[1]] = (p[c[1]] || 0) + (c[0]==1 ? 1 : -1);
        return p;
    }, {});
    if (Object.values(p).some(x =&gt; x != 0)) { return false }
    else { return true };
}        

console.log(pairOfShoes(shoes));


[Edit: It might also be clearer to replace your reduce function with a `for' loop.]