We talked about variables before. A variable is a label associated to a value.
This value can has a type attached.
When it comes to types, you have 2 kind of programming languages: loosely typed and strongly typed.
And statically typed vs dynamically typed, but I won’t go into the explanation.
For now, just know that some languages really want you to deal with types, very explicitly, and some other languages let you be more dynamic. Typically, compiled languages are more strict on this matter.
const number = 5
const name = 'Flavio'
without saying the first is a number, and the second is a string.
Date, and more.
The type of a value identifies what you can do with it. It provides peculiar properties and methods you can call on it. For example a string can be trimmed using the
A number has other properties and methods.
In short, not all variables are equal.