Symbol
Symbol data type is used to create objects which will always be unique. these objects can be created using Symbol constructor.
Example: Below is an example.
let sym = Symbol("Hello")
console.log(typeof(sym));
console.log(sym);
Output
symbol Symbol(Hello)
Primitive and Non-primitive data-types in JavaScript
In JavaScript, variables hold values, and each value possesses a data type that indicates the nature of the stored information. Broadly, JavaScript classifies data types into two categories: Primitive data types and Non-primitive data types. These distinctions are essential for understanding how data is handled and manipulated within the language. Let us discuss it one by one.