Too much talk, there are two items here:
const foo = '' || 'default string';
console.log(foo); // output is 'default string'
const foo = '' ?? 'default string';
console.log(foo); // output is empty string i.e. ''
The nullish coalescing operator (??) is a logical operator that returns its right-hand side operand when its left-hand side operand is null or undefined, and otherwise returns its left-hand side operand.