what is the difference between wrappers and primitives
es: diff between int i=200 in primitives and integeri = new
integer(54)



what is the difference between wrappers and primitives es: diff between int i=200 in primitives and..

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

Post New Answer

More JavaScript Interview Questions

What are the basic groups of dataypes in JavaScript?

1 Answers  


What is primitive data types in javascript?

1 Answers  


what is interface ?

5 Answers  


What are the different types of errors available in javascript?

1 Answers  


What is an Event Bubbling in Javascript?

1 Answers  


What is escape() function?

1 Answers  


Why are callbacks used?

1 Answers  


Is client side front end?

1 Answers  


What is the Infinity property used for in Javascript?

1 Answers  


Can you tell me how to send email using javascript?

2 Answers  


What is the most widely used programming language?

1 Answers  


What is the difference between synchronous and asynchronous JavaScrip

1 Answers  


Categories