JAVASCRIPT TEST QUESTIONS AND
ANSWERS ALL CORRECT
Two types of variable scope? - Answer-Local and Global
What are the properties of a Local Scope? - Answer-Within a function, only available
within function
What are the properties of Global Scope? - Answer-Outside a function, available to any
code outside that function (also within).
What is Variable "Hoisting"? - Answer-Variables are hoisted to the top of the
function/statement. It is useful because you can refer to variables declared later in the
code.
What is best practice regarding variable declarations? - Answer-Put variable
declarations close to the top of the scope as possible.
Define: Prototype Based - Answer-Each object has a prototype that it inherits properties
and abilities from
Define: Dynamic Typing - Answer-Dynamic if the type of variable is interpreted at
runtime.
Define: First Class Function - Answer-Treats functions as first class citizens - you can
do with functions everything you can do with other elements.
Define: Multi Paradigm Language - Answer-Supports more than one programming
paradigm - developers can work with a variety of styles within javascript.
Define: DOM - Answer-Document Object model.
What is DOM? - Answer-Representation of HTML Page....
What are the two ways to add JS to your site? - Answer-Internally and Externally.
What must a variable begin with? - Answer-A letter, $ or _
CONCEPT 1. What is a variable? - Answer-Container for a piece of data
ANSWERS ALL CORRECT
Two types of variable scope? - Answer-Local and Global
What are the properties of a Local Scope? - Answer-Within a function, only available
within function
What are the properties of Global Scope? - Answer-Outside a function, available to any
code outside that function (also within).
What is Variable "Hoisting"? - Answer-Variables are hoisted to the top of the
function/statement. It is useful because you can refer to variables declared later in the
code.
What is best practice regarding variable declarations? - Answer-Put variable
declarations close to the top of the scope as possible.
Define: Prototype Based - Answer-Each object has a prototype that it inherits properties
and abilities from
Define: Dynamic Typing - Answer-Dynamic if the type of variable is interpreted at
runtime.
Define: First Class Function - Answer-Treats functions as first class citizens - you can
do with functions everything you can do with other elements.
Define: Multi Paradigm Language - Answer-Supports more than one programming
paradigm - developers can work with a variety of styles within javascript.
Define: DOM - Answer-Document Object model.
What is DOM? - Answer-Representation of HTML Page....
What are the two ways to add JS to your site? - Answer-Internally and Externally.
What must a variable begin with? - Answer-A letter, $ or _
CONCEPT 1. What is a variable? - Answer-Container for a piece of data