0

On this page it says:

Except for null and undefined, all primitive values have object equivalents that wrap around the primitive values:

I am aware of String, Number etc. and what they can do (i.e. when used as a function they can convert their arguments into a data-type) but what does it mean to say that they are 'wrap around primitive values'?

  • "wrap around" and "wrapper" are common terms for objects like that. It's not specific to JavaScript. – Pointy Jul 27 '20 at 13:36
  • Search for autoboxing – adiga Jul 27 '20 at 13:43
  • @Pointy So another word for the concept of 'boxing' as mentioned in the answer here?(https://stackoverflow.com/questions/63106836/how-does-javascript-temporarily-treat-string-primitives-as-instances-of-string-c/63107092?noredirect=1#comment111594212_63107092) – tonitone117 Jul 27 '20 at 13:44
  • 1
    Yes, it's the same concept as "boxing". – Pointy Jul 27 '20 at 13:47

1 Answers1

-1

The statement made on this website reflects the idea that all of the primitive data types (string, booleans etc...) have a general word that represents the. For the string datatype, it is String. For the boolean datatype, it is Boolean. Most of the time, the wrap-around primitive values are just the capitalization of the datatypes.

Elias Fizesan
  • 265
  • 1
  • 3
  • 18