Variables are declared with the var keyword as follows:
Ex- var msg; //multi line declaration
var focusname;
var msg, focusname; //Single line declaration
Here, msg & focusname are variable names that holds value.
var keyword is used only for declaration.
JavaScript is a dynamically typed language. This means that a JavaScript variable can hold a value of any data type.
Unlike many other languages, you don't have to tell JavaScript during variable declaration what type of value the variable will hold.
The value type of a variable can change during the execution of a program and JavaScript takes care of it automatically.