Boxing in Javascript

20/10/2023

Have you ever wondered why primitive values have methods directly associated with them? For instance, even though the string 'Hello' is a primitive value, you can access numerous methods like 'Hello'.toLowerCase(). This is known as "boxing" in JavaScript, where JavaScript automatically wraps the string primitive with an object, such as new String('Hello')

Created by @Wassim built with @NextJs deployed in @Vercel