When you use the .
operator on a variable that is a primitive data type, the variable will be autoboxed, for example:
var str = "Hello World"; // str is of type string
console.log(str.length); // a temporary object of type String will be created
But does autoboxing only happen when the .
operator is used?