eg-259:review:javascript02
Review Questions
Adapted from: Chapter 4 of Robert W. Sebasta, Programming the World-Wide Web, 3rd Edition, Addison Wesley, 2006. Supporting: Contact Hour 8.
- What is a control construct?
- Must the
then
clause of anif
statement in JavaScript always be a compound statement? - What are the three possible forms of control expressions in JavaScript?
- What is the difference between
==
and===
? - Explain what short-circuit evaluation of an expression means.
- What are the semantics of a
break
statement? - What is the difference between a
while
statement and ado
-while
statement? - When is a JavaScript constructor called?
- What is the difference between a constructor in Java and one in JavaScript?
- What properties does an object created with a
new
operator and the Object constructor have? - Describe the two ways the properties of an object can be referenced.
- How is a new property of an object created?
- Describe the semantics of the
for-in
statement. - Describe the two ways an Array object can he created.
- What exactly does a constructor do in JavaScript?
- What relationship is there between the value of the
length
property of an Array object and the actual number of existing elements in the object? - Describe the semantics of the
join
method ofArray
. - Describe the semantics of the
slice
method when it is given just one parameter. - What is the form of a nested array literal?
- What value is returned by a function that contains no
return
statement? - Define the scope of a variable in a JavaScript script embedded in an XHTML document when the variable is not declared in a function.
- Is it possible to reference global variables in a JavaScript function?
- What is the advantage of using local variables in functions?
- What parameter-passing method does JavaScript use?
- Does JavaScript check the types of actual parameters against the types of their corresponding formal parameters?
- How can a function access actual parameter values for those actual parameters that do not correspond to any formal parameter?
- What is one way in which primitive variables can be passed by reference to a function?
eg-259/review/javascript02.txt · Last modified: 2012/02/10 17:01 by eechris