Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 502 Bytes

what_are_wrapper_objects.md

File metadata and controls

17 lines (10 loc) · 502 Bytes

What are wrapper objects?

Wrapper objects in JavaScript are objects that wrap primitive values (like String, Number, and Boolean). They allow you to call methods on primitive types.

Example:

let str = 'hello';
let strObj = new String(str);
console.log(strObj.toUpperCase());  // Output: 'HELLO'

Tags: intermediate, JavaScript, Data Types