I was working with the variables and datatypes and found that I can also define variables without initializing it with var, let or const. But when I defined a variable without var, let or const it becomes the type of "string" always. If I assigned my variable with number then too its type becomes string. If I add two numbers let's say 10 and 20, it gets add and results 30 but the type still shows its a string. So if anyone could explain me why is it always showing string.
car = "Mercedes";
console.log(car); // outputs Mercedes
console.log(typeof car); // outputs string
car = 123;
console.log(car); // outputs 123
console.log(typeof car); // outputs string
car = 10 + 20;
console.log(car); // outputs 30
console.log(typeof car); // outputs string