Just use the
typeof operator to get the type of a variable. Here is how to use it:
- let variable = "webdevetc";
- console.log(typeof variable)
N.B. if you do
typeof on a variable that is set to
null, it will tell you it is an object.