JavaScript Values

A hello string is a value. A number like 12 is a value.

hello and 12 are values. string and number are the types of those values.

The type is the kind of value, its category. We have many different types in JavaScript, and we'll talk about them in detail later on. Each type has its own characteristics.

When we need to have a reference to a value, we assign it to a variable. The variable can have a name, and the value is what's stored in a variable, so we can later access that value through the variable name.

Let's try to see thye example for better understanding.

Example:


var-keyword identifier = value;
var cat = "Samira";
            

The above code show how simple it's to create and store value in a variable. And you can call it by calling the identifier.