There’s a very interesting explanation for this. Normally one would write this off and say, you don’t use commas in variable name concatenation and that’s the end of the story, but let’s see what documention says about commas!
The comma operator ( ,
) evaluates each of its operands (from left to right) and returns the value of the last operand.
So let’s play with this idea:
x = (2, 3);
// output 3
x = (2, 2);
// output 2
x = ("word", + "fruit")
// output NaN (not a number)
x = ("word", + " ");
//output 0
console.log(0 == " ")
//output: true
This is specifically why you got "Donald 0Duck"
The MDN documenation is again very helpful here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comma_Operator
The short answer for your question is if you omit the comma it will work.