As outlined above, primitives get "boxed", so the following:
Object.assign(true, obj1, obj2)
is merely the same as:
const bool = Object.assign(new Boolean(true), obj1, obj2)
now boolean objects are just regular objects, that return a boolean when valueOf() is called on them. That means you get some funny behaviour:
bool === true // false
bool == true // true
+bool === 1 // true
You cannot even use that Boolean object inside conditions as all objects are truthy:
if(Object.assign(false,{a: 1 }))
alert("works");
So actually there is no difference between a regular object and a Boolean object, except that the latter adds some confusion and serves no purpose whatsoever.
Object.assignconverts the first argument to an object if it isn't already (ecma-international.org/ecma-262/9.0/#sec-object.assign). Boolean objects don't have any use.