JavaScript Object to Primitive Conversion
Type coercion - Objects to Primitives
Type coercion can also occur on objects when certain operations are done on them.
See the example below:
const obj1 = { name: 'Peace', age: 18 };
const obj2 = { name: 'Bob', age: 10 };
const obj = obj1 + obj2;
/...
techstack.hashnode.dev3 min read