JAVASCRIPT EXAMPREP TESTED
QUESTIONS WITH DETAILED SOLUTIONS
ALREADY PASSED
●● What tools do you need to create web applications in JavaScript?
Answer: A text editor, A Browser
●● Where do you put the JavaScript so that it will execute properly in
your documents?
Answer: Linked as an external file with a .js extension. , at the end of the
body section of the HTML document, In the head section of the HTML
document, In a "script block" within the HTML
●● The alert() function is a method to give user feedback. What does the
command do when executed?
Answer: Pops up a dialog box in the browser with text information and
an "OK" button.
●● How would you format a comment in JavaScript to leave author
notes or assist in troubleshooting your code?
Answer: /* commented text*/ , // commented text
●● data types recognized in JavaScript
, Answer: Text, Numbers, Booleans
●● What is a variable?
Answer: Temporary data storage that can be altered, or varied.
●● A variable declaration is the creation of a new storage area in
memory. It is achieved using the var keyword and
Answer: a name.
●● Once declared, a variable gets its type and value through the process
of
Answer: declaration.
●● What is an array?
Answer: A variable that can hold more than one value.
●● Which of the following is NOT a comparison operator? <
>=
=
==
!=
Answer: =
QUESTIONS WITH DETAILED SOLUTIONS
ALREADY PASSED
●● What tools do you need to create web applications in JavaScript?
Answer: A text editor, A Browser
●● Where do you put the JavaScript so that it will execute properly in
your documents?
Answer: Linked as an external file with a .js extension. , at the end of the
body section of the HTML document, In the head section of the HTML
document, In a "script block" within the HTML
●● The alert() function is a method to give user feedback. What does the
command do when executed?
Answer: Pops up a dialog box in the browser with text information and
an "OK" button.
●● How would you format a comment in JavaScript to leave author
notes or assist in troubleshooting your code?
Answer: /* commented text*/ , // commented text
●● data types recognized in JavaScript
, Answer: Text, Numbers, Booleans
●● What is a variable?
Answer: Temporary data storage that can be altered, or varied.
●● A variable declaration is the creation of a new storage area in
memory. It is achieved using the var keyword and
Answer: a name.
●● Once declared, a variable gets its type and value through the process
of
Answer: declaration.
●● What is an array?
Answer: A variable that can hold more than one value.
●● Which of the following is NOT a comparison operator? <
>=
=
==
!=
Answer: =