In the world of coding, types define a scope around what can be used to express a value.
If this first line already confused you, I have done well.
What is a Type?
Type’s can be numbers, words, objects, arrays, floats, etc.
But what does that mean?
So what is Strict Types vs Loose Types
This type is used for everything from words, sentences and paragraphs. Basically anything that probably isn’t being used to mathematically be calculated.
Numbers are stored in Integers. These can be used to calculate equations such as addition, subtraction, division, multiplication, etc.
Arrays are used to store a list of values that are grouped together. This is handy for when you need to iterate (go through systematically) the list to display it.
Floats are used to store values that require more precision. Integers do not reflect after the decimal points. So Floats are required to be used when working with numbers that are smaller than 1. E.g. 0.314345345345
Computers have limited memory, be it storage or RAM. By defining types you are permitting the application to only consume an upper limit of memory for that particular variable that you have declared.
In the future, I will discuss a language called TypeScript which enforces strict Types in the development stage to limit issues before they happen in the user’s browser.