JavaScript MCQ : JS Variables (Multiple Choice Questions)


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
to all the functions
B
All the scripts inside save JS File
C
Inside the function in which it is declared
D
None of these
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
Local
B
Global
Question 5
Variable declared outside JavaScript Function is called as _______________ .
A
Local Variable
B
Global Variable
There are 5 questions to complete.