360medlink Interview Question

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