object wrappers are objects that encapsulate primitive data types (such as numbers, strings, and booleans) and provide them with additional methods and properties.
These wrappers allow you to treat primitive values as objects, enabling you to access and manipulate their values more conveniently.
All primitive types, except null and undefined, have their corresponding object wrapper types,
When you try to access a property or method on a primitive, JavaScript temporarily wraps that primitive in a special object so you can use its powers.
The Trigger: You call .toUpperCase() on a string.
The Wrap: JavaScript creates a temporary String object: new String('gemini').
The Execution: It runs the method on that object and returns the result.
The Cleanup: JavaScript immediately throws the object away (garbage collection) to save memory.
Performance: Primitives are lightning-fast and take up very little memory. Objects are heavy.