Question 1 Although JavaScript is considered a programming language, it is also
ID: 644115 • Letter: Q
Question
Question 1
Although JavaScript is considered a programming language, it is also a critical part of web page design and authoring.
True
False
.
3.35 points
Question 2
Like HTML, XHTML is not case sensitive.
True
False
.
3.35 points
Question 3
Elements that do not require a closing tag are called empty elements.?
True
False
.
3.35 points
Question 4
A comparison operator is used to compare two operands and determine if one numeric value is greater than another.
True
False
.
3.35 points
Question 5
In JavaScript code, you use the words yes and no to indicate Boolean values.
True
False
.
3.35 points
Question 6
Parentheses are used with expressions to change the associativity with which individual operations in an expression are evaluated.
True
False
.
3.35 points
Question 7
You can think of an array as a collection of variables contained within a single variable.
True
False
.
3.35 points
Question 8
An if statement keeps repeating until its conditional expression evaluates to false.
True
False
.
3.35 points
Question 9
A break statement restarts a loop with a new iteration?
True
False
.
3.35 points
Question 10
Syntax refers to the order in which various parts of a program run, or execute.?3?
True
False
.
3.35 points
Question 11
An HTML document is a text document that contains codes called ____.
a.
styles
b.
rules
c.
elements
d.
tags
.
3.35 points
Question 12
The procedures associated with an object are called ____.
a.
methods
b.
functions
c.
attributes
d.
processes
.
3.35 points
Question 13
Which method do you use to reference an element on a web page in a script?
a.
write()
b.
onclick()
c.
getElementById()
d.
alert()
.
3.35 points
Question 14
____ are lines of code that are not processed by browsers, which you use to add notes about your code.?
a.
methods
b.
comments
c.
variables
d.
properties
.
3.35 points
Question 15
Which method displays a dialog box with an OK button?
a.
onclick()
b.
alert()
c.
getElementById()
d.
write()
.
3.35 points
Question 16
A ____ variable is one that is declared outside a function and is available to all parts of your program.
a.
scoped
b.
limited
c.
local
d.
global
.
3.35 points
Question 17
Data types that can be assigned only a single value are called ____ types.
a.
Boolean
b.
numeric
c.
primitive
d.
null
.
3.35 points
Question 18
Programming languages that require you to declare the data types of variables are called ____ typed programming languages.
a.
loosely
b.
strongly
c.
static
d.
dynamic
.
3.35 points
Question 19
JavaScript is a ____ programming language.
a.
static typed
b.
loosely typed
c.
strongly typed
d.
numeric typed
.
3.35 points
Question 20
You can use the compound ____ to combine two strings.
a.
declaration operator
b.
assignment operator
c.
value separator
d.
equals comparison
.
3.35 points
Question 21
The strict equal operator is ____.
a.
=
b.
!=
c.
===
d.
==
.
3.35 points
Question 22
The And operator is ____.
a.
!=
b.
===
c.
&&
d.
||
.
3.35 points
Question 23
Each piece of data contained in an array is called a(n) ____.
a.
index
b.
element
c.
range
d.
column
.
3.35 points
Question 24
One of the simplest types of loop statements is the ____ statement, which repeats a statement or series of statements as long as a given conditional expression evaluates to a truthy value.
a.
switch
b.
if
c.
while
d.
continue
.
3.35 points
Question 25
Unlike the while statement, the statements in a ____ statement always execute once, before a conditional expression is evaluated.
a.
do/until
b.
do/while
c.
do/continue
d.
do/using
.
3.35 points
Question 26
Which of the following references the second element in the newsSections array?
a.
newsSections(1)
b.
newsSections[1]
c.
newsSections[2]
d.
newsSections(2)
.
3.35 points
Question 27
Which method returns a collection of references to all instances of a certain element in an HTML document?
a.
getElementsByClassName()
b.
getElementById()
c.
getElementsByTagName()
d.
getElementsByName()
.
3.35 points
Question 28
A ____ error occurs when the interpreter fails to recognize code.
a.
logic
b.
run-time
c.
syntax
d.
web
.
3.35 points
Question 29
An infinite loop is an example of a(n) ____ error?
a.
user
b.
syntax
c.
run-time
d.
logic
.
3.35 points
Question 30
The ____ method is used in JavaScript to execute code after a specific amount of time has elapsed.
a.
clearInterval()
b.
startTimeout()
c.
setTimeout()
d.
clearTimeout()
.
.
Explanation / Answer
1 : True
2 : False
3 : True
4 : True
5 : False
6 : True
7 : True
8 : False
9 : False
10 : False
11 : d
12 : a
13 : c
14 : b
15 : b
16 : d
17 : c
18 : b
19 : b
20 : b
21 : c
22 : c
23 : b
24 : c
25 : b
26 : c
27 : a. getElementsByClassName(): It Returns a NodeList containing all elements with the specified class name
b. getElementById(): Returns the element that has the ID attribute with the specified value
c. getElementsByTagName(): Returns a NodeList containing all elements with the specified tag name
d. getElementsByName(): Returns a NodeList containing all elements with a specified name
Therefore, the answer is d.
28 : c
29 : d
30 : c
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.