Congratulations - You have completed JavaScript : MCQ.
Your Score | : | %%SCORE%% |
Total Marks | : | %%TOTAL%% |
Rating | : | %%RATING%% |
Wrong Answers | : | %%WRONG_ANSWERS%% |
Your answers are highlighted below.
Question 1 |
Variable declared inside JavaScript Function will be called as ____________.
Global Variables | |
Local Variables |
Question 2 |
Vriables declared inside function are visible _______________.
None of these | |
to all the functions | |
Inside the function in which it is declared | |
All the scripts inside save JS File |
Question 3 |
Local Variables are destroyed after execution of function.
True | |
False |
Question 4 |
<script type="text/javascript"> function message() { var name = "Pritesh"; alert(name); } </script>Variable declared above is example of ___________ Variable.
Global | |
Local |
Question 5 |
Variable declared outside JavaScript Function is called as _______________ .
Global Variable | |
Local Variable |
Question 6 |
Local Variables are Destroyed as soon as ______________.
control comes outside the method | |
user closes the browser | |
page gets completely loaded | |
None of these |
Question 7 |
<script type="text/javascript"> var name; name = "Pritesh"; </script> <script type="text/javascript"> document.write(name); </script>What will be the output of the following ?
Nothing will be printed | |
None of these | |
Error | |
Pritesh |
Question 7 Explanation:
Variable is declared outside the method so it is called as Global Variable.
Once you are finished, click the button below. Any items you have not completed will be marked incorrect.
There are 7 questions to complete.