JavaScript MCQ : JS Variables (Multiple Choice Questions)
Question 1 |
Variable declared inside JavaScript Function will be called as ____________.
Global Variables | |
Local Variables |
Question 2 |
Vriables declared inside function are visible _______________.
Inside the function in which it is declared | |
to all the functions | |
All the scripts inside save JS File | |
None of these |
Question 3 |
Local Variables are destroyed after execution of function.
False | |
True |
Question 4 |
<script type="text/javascript"> function message() { var name = "Pritesh"; alert(name); } </script>Variable declared above is example of ___________ Variable.
Local | |
Global |
Question 5 |
Variable declared outside JavaScript Function is called as _______________ .
Global Variable | |
Local Variable |
There are 5 questions to complete.