OPSWAT interview question

What is the scope of JavaScript? How to define a jQuery, PHP variable?