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 ____________.
A
Global Variables
B
Local Variables
Question 2
Vriables declared inside function are visible _______________.
A
None of these
B
to all the functions
C
Inside the function in which it is declared
D
All the scripts inside save JS File
Question 3
Local Variables are destroyed after execution of function.
A
True
B
False
Question 4
<script type="text/javascript">
    function message() {
        var name = "Pritesh";
        alert(name);
    }
</script>
Variable declared above is example of ___________ Variable.
A
Global
B
Local
Question 5
Variable declared outside JavaScript Function is called as _______________ .
A
Global Variable
B
Local Variable
Question 6
Local Variables are Destroyed as soon as ______________.
A
control comes outside the method
B
user closes the browser
C
page gets completely loaded
D
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 ?
A
Nothing will be printed
B
None of these
C
Error
D
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. Get Results
There are 7 questions to complete.