JavaScript supports the notion of weak typing.
JavaScript supports the notion of weak typing, or dynamic typing. This means that the type of a variable is
var keyword.
var v = "Some String Data";
alert(typeof v);
v = 5;
alert(typeof v);
In above first instance, a message box will be displayed showing that the type of v is a string. In the second
instance, the type of v is a number. The type of the v variable has been inferred, and in fact changed, according to what type of data it contains.

Join the conversation! Your thoughts help the community grow.