what is the difference between wrappers and primitives
es: diff between int i=200 in primitives and integeri = new
integer(54)
Answer / Nagender Kumar
In JavaScript, primitives are basic data types such as Number (int), String, Boolean, Null, and Undefined. They are passed by value, meaning that their original values are copied when assigned to variables or function arguments. On the other hand, wrappers are objects that wrap primitive values for better handling in objects or functions. For example, Number wrapper can be created with the new operator: var num = new Number(54). Wrappers behave as objects but are still converted back to their original primitives when needed.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the basic groups of dataypes in JavaScript?
What is primitive data types in javascript?
what is interface ?
What are the different types of errors available in javascript?
What is an Event Bubbling in Javascript?
What is escape() function?
Why are callbacks used?
Is client side front end?
What is the Infinity property used for in Javascript?
Can you tell me how to send email using javascript?
What is the most widely used programming language?
What is the difference between synchronous and asynchronous JavaScrip