Script – 23-22 Jan 26

What does the OR statement do in this block of code?
result = cars.reduce(function (r, a) {
console.log("RR",r)
r[a.make] = r[a.make] || [];
r[a.make].push(a);
return r;
}, Object.create(null));
result = cars.reduce(function (r, a) {
console.log("RR",r)
r[a.make] = r[a.make] || [];
r[a.make].push(a);
return r;
}, Object.create(null));
UU
Unknown User813d ago
S
Script813d ago
ah make sense. thanks
UU
Unknown User812d ago