7/5/2023 0 Comments Javascript you dont know js"testing" is a primitive string, and thus doesn’t (and can’t) have methods. When you use a method on a primitive, like this: console.log("testing".toUpperCase()) The only automatic boxing done in JavaScript is: For instance, new Number(42) creates a Number object for the primitive number 42. “Boxing” is wrapping an object around a primitive value. ![]() First, let’s define “boxing,” since the term isn’t commonly used in JavaScript (it doesn’t appear in the spec, for instance):
0 Comments
Leave a Reply. |