A. #div {
b. div {
background: grey;
}
c. div {
background: rgb(0, 0, 250);
}
d. DIV {
background: rgb(0, 0, 250);
}
4. When you run eslint –version on your computer, what version does it report is installed?
a. Version 5 or higher
b. Version 17 or higher
c. v3.12.1
d. Version 2.0.0 or lower
I don’t have eslint installed on my computer.
5. With CSS, how could you be sure to give every
tag on a page a grey background?
A. #div {
background: grey;
}
b. div {
background: grey;
}
c. .div {
background: rgb(0, 0, 250);
}
d. DIV {
background: rgb(0, 0, 250);
}
6. Consider this JavaScript code:
var a = 42;
var b = “forty-two”;
Which of the following options is true of this code?
A. To the computer, they are identical.
B. The variable a is a “number” type, and variable b is a “string” type.
C. This is invalid JavaScript code.
a > b
7. What CSS property, when applied to an image, positions the image toward the left, so that adjacent text flows beside and under it?
flow: right;
B. float: left;
C. layout: float;
D.image: left;
E. text: flow-right;
8. Which of the following statement best describes the body element inside an HTML document?
a. The body element can be embedded inside the head element.
b. There can be multiple tags inside an HTML document
c. Heading tags such as
,
or
cannot go inside the body element. They should be placed inside the head element for proper rendering.
d. Content, such as text or images, is placed within the body element.
9. Consider the following HTML code:
HTML excercise
This exercise covers basic HTML topics
Which of following choices best describes the code above?
A. The HTML code has all the necessary tags for a valid HTML document
B. The HTML code has duplicate html tags
C. The HTML code has misplaced title tag. Title tag should always be placed with the text inside the paragraph tag
D. The HTML code is invalid as it does not include any css or javascript tag
10. Consider the following conditional statement:
((2 * 90) === 180) && (false && ‘true’)
The result of this code is false because:
a. The statement contains false boolean in it and when combined with other variables it always turns them to false as well.
b. The statement is evaluating 2 different sub expressions. The results of these expressions are then compared with the “and” operator. Since one is false, the whole statement evaluates to false.
c. The statement is too complex and error prone, essentially resulting in false.
d. The statement is trying to combine numbers (2, 90, 180) with the wrong symbols and hence resulting in false.
11. Which of the following JavaScript “for loops” will have the maximum iterations?
a. for (var i = 1; i <= 24; i = i + 1) {}
b. for (var i = 4; i < 24; i = i + 2) {}
c. for (var i = 4; i < 24; i = i + 1) {}
d. for (var i = 4; i < 24; i = i + 24) {}
12. Which of following code snippets properly declares a greet function that returns a greeting, and then calls it?
Snippet A:
var greet function name
return “Hello, ” + name
greet()
Snippet B:
function(name) {
return “Hello, ” + name;
}
greet;
Snippet C:
Snippet C:
var greet = {
“Hello, ” + name;
}
greet();
Snippet D:
function greet(name) {
return “Hello, ” + name;
}
greet(“Grace Hopper”);
A. A
B. B and D
C. A,B,D
D. D
E. B and C
F.