A variable declared outside a function, becomes GLOBAL. A global variable has global scope: All scripts and functions on a web page can access it.
var carName = " Volvo";
// code here can use carName
function myFunction() {
// code here can use carName
}