360medlink interview question

What are the variable scopes in javascript? how do we assign it?