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
Inside the function in which it is declared
B
to all the functions
C
All the scripts inside save JS File
D
None of these
Question 3
Local Variables are destroyed after execution of function.
A
False
B
True
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
Global Variable
B
Local Variable
There are 5 questions to complete.