JavaScript provides five scalar primitive types: Number, Boolean, String, Undefined, Null and two compound primitive types Array and Object. Even though JavaScript supports object-orientation features, it still supports these scalar primitive data types simply because of performance reasons. Maintenance of primitive values is much faster than objects. JavaScript also provides object versions known as wrapper objects for the primitive types Number, Boolean and String namely, Number, Boolean and String. All primitive values are stored on stack whereas objects are stored in heap. String Data Type A string literal is a string value enclosed in either double quotes or single
The post What are the literals and datatypes in javascript appeared first on Coding Security.
What are the literals and datatypes in javascript
read more
Tidak ada komentar:
Posting Komentar