JavaScript is a loosely typed language
A loosely typed language is one that doesn't attach it's variables to a particular datatype.
This gives us the freedom of assigning a variable with different datatypes.
console.log(a);
var a = 10;
console.log(a);
a = "Hello";
console.log(a);
Output
undefiend
10
Hello
The opposite of a loosely typed language would be a strictly typed language.
Languages such as Java, C++ fall under this category.