function maxChecker(str) {
let final = {};
for (let char of str) {
final[char] = final[char] + 1 || 1;
}
return final;
}
If in this code I don't use the expression || 1 then my values in object is NAN kindly explain this
final[char]= final[char]+1 || 1;