Skip to content

Commit afb625b

Browse files
Stephen LeeStephen Lee
Stephen Lee
authored and
Stephen Lee
committed
remove html pre and code tags
1 parent 732ccc2 commit afb625b

File tree

5 files changed

+25
-25
lines changed

5 files changed

+25
-25
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
>>Which of the following `console.log()` statements return "Welcome!"? <<
22
3-
(x) <pre><code>console.log("Welcome!");</code></pre> {{Correct because the statement prints "Welcome!" to the console with no syntax error.}}
4-
( ) <pre><code>console.print("Welcome!");</code></pre> {{Incorrect because "log" should be used instead of "print".}}
5-
( ) <pre><code>console.log Welcome!</code></pre> {{Incorrect because the statement does not adhere to JavaScript syntax.}}
6-
( ) <pre><code>console.log -> (Welcome!)</code></pre> {{Incorrect because the statement does not adhere to JavaScript syntax.}}
7-
( ) <pre><code>console.log()</code></pre> {{Incorrect because the statement does not print anything to the console.}}
3+
(x) `console.log("Welcome!");` {{Correct because the statement prints "Welcome!" to the console with no syntax error.}}
4+
( ) `console.print("Welcome!");` {{Incorrect because "log" should be used instead of "print".}}
5+
( ) `console.log Welcome!` {{Incorrect because the statement does not adhere to JavaScript syntax.}}
6+
( ) `console.log -> (Welcome!)` {{Incorrect because the statement does not adhere to JavaScript syntax.}}
7+
( ) `console.log()` {{Incorrect because the statement does not print anything to the console.}}
88

99
||The syntax of the `console.log()` method is shown in the sample code above. ||
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
>>Which of the following `alert()` statements return "Beware!"? <<
22
3-
( ) <pre><code>alert(Beware!);</code></pre> {{Incorrect because the statement does not adhere to JavaScript syntax, "Beware!" should be enclosed with quotation marks.}}
4-
( ) <pre><code>alert -> Beware!</code></pre> {{Incorrect because the statement does not adhere to JavaScript syntax.}}
5-
( ) <pre><code>alert();</code></pre> {{Incorrect because the statement does not print a message with the alert box.}}
6-
(x) <pre><code>alert("Beware!");</code></pre> {{Correct because the statement prints "Beware!" as an alert box.}}
7-
( ) <pre><code>alertBeware();</code></pre> {{Incorrect because this function does not exist in JavaScript.}}
3+
( ) `alert(Beware!);` {{Incorrect because the statement does not adhere to JavaScript syntax, "Beware!" should be enclosed with quotation marks.}}
4+
( ) `alert -> Beware!` {{Incorrect because the statement does not adhere to JavaScript syntax.}}
5+
( ) `alert();` {{Incorrect because the statement does not print a message with the alert box.}}
6+
(x) `alert("Beware!");` {{Correct because the statement prints "Beware!" as an alert box.}}
7+
( ) `alertBeware();` {{Incorrect because this function does not exist in JavaScript.}}
88

99
||The syntax of the `alert()` method is shown in the sample code above. ||
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
>>Which of the following statements are examples of pop-up boxes? <<
22
3-
[ ] <pre><code>Prompt("Welcome", 0);</code></pre> {{ selected: Incorrect because the statement does not adhere to JavaScript syntax. "Prompt" should not be capitalized.}, { unselected: Incorrect because the statement does not adhere to JavaScript syntax. "Prompt" should not be capitalized.}}
4-
[ ] <pre><code>alert</code></pre> {{ selected: Incorrect because the statement does not adhere to JavaScript syntax. The parenthesis and input are missing.}, { unselected: Incorrect because the statement does not adhere to JavaScript syntax. The parenthesis and input are missing.}}
5-
[x] <pre><code>alert("Welcome");</code></pre> {{ selected: Correct because the alert box adheres to JavaScript Syntax.}, { unselected: Correct because the alert box adheres to JavaScript Syntax.}}
6-
[x] <pre><code>confirm("Welcome");</code></pre> {{ selected: Correct because the confirm box adheres to JavaScript Syntax.}, { unselected: Correct because the confirm box adheres to JavaScript Syntax.}}
7-
[ ] <pre><code>prompt(</code></pre> {{ selected: Incorrect because the statement does not adhere to JavaScript syntax. The right bracket and input are missing.}, { unselected: Incorrect because the statement does not adhere to JavaScript syntax. The right bracket and input are missing.}}
3+
[ ] `Prompt("Welcome", 0);` {{ selected: Incorrect because the statement does not adhere to JavaScript syntax. "Prompt" should not be capitalized.}, { unselected: Incorrect because the statement does not adhere to JavaScript syntax. "Prompt" should not be capitalized.}}
4+
[ ] `alert` {{ selected: Incorrect because the statement does not adhere to JavaScript syntax. The parenthesis and input are missing.}, { unselected: Incorrect because the statement does not adhere to JavaScript syntax. The parenthesis and input are missing.}}
5+
[x] `alert("Welcome");` {{ selected: Correct because the alert box adheres to JavaScript Syntax.}, { unselected: Correct because the alert box adheres to JavaScript Syntax.}}
6+
[x] `confirm("Welcome");` {{ selected: Correct because the confirm box adheres to JavaScript Syntax.}, { unselected: Correct because the confirm box adheres to JavaScript Syntax.}}
7+
[ ] `prompt(` {{ selected: Incorrect because the statement does not adhere to JavaScript syntax. The right bracket and input are missing.}, { unselected: Incorrect because the statement does not adhere to JavaScript syntax. The right bracket and input are missing.}}
88

99
||The syntax for some of the answer choices are incorrect. ||
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
>>Which of the following is a read-only data provided by JavaScript? <<
22
3-
( ) <pre><code>Math</code></pre> {{Incorrect because `Math` is a not a read-only data.}}
4-
( ) <pre><code>WINDOW</code></pre> {{Incorrect because `WINDOW` is a not a read-only data.}}
5-
( ) <pre><code>browsers</code></pre> {{Incorrect because `browsers` is a not a read-only data.}}
6-
(x) <pre><code>screen</code></pre> {{Correct because `screen` is a read-only data.}}
7-
( ) <pre><code>Date</code></pre> {{Incorrect because `Date` is a not a read-only data.}}
3+
( ) `Math` {{Incorrect because `Math` is a not a read-only data.}}
4+
( ) `WINDOW` {{Incorrect because `WINDOW` is a not a read-only data.}}
5+
( ) `browsers` {{Incorrect because `browsers` is a not a read-only data.}}
6+
(x) `screen` {{Correct because `screen` is a read-only data.}}
7+
( ) `Date` {{Incorrect because `Date` is a not a read-only data.}}
88

99
||The case and spelling of the read-only data must match the given spelling by JavaScript. ||
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
>>Which of the following method does NOT belong to the `Console` object?<<
22
3-
( ) <pre><code>log()</code></pre> {{Incorrect because `console.log()` is a valid method in the `Console` object.}}
4-
( ) <pre><code>debug()</code></pre> {{Incorrect because `console.debug()` is a valid method in the `Console` object.}}
5-
( ) <pre><code>error()</code></pre> {{Incorrect because `console.error()` is a valid method in the `Console` object.}}
6-
( ) <pre><code>warn()</code></pre> {{Incorrect because `console.warn()` is a valid method in the `Console` object.}}
7-
(x) <pre><code>message()</code></pre> {{Correct because `console.message()` is not a valid method in the `Console` object.}}
3+
( ) `log()` {{Incorrect because `console.log()` is a valid method in the `Console` object.}}
4+
( ) `debug()` {{Incorrect because `console.debug()` is a valid method in the `Console` object.}}
5+
( ) `error()` {{Incorrect because `console.error()` is a valid method in the `Console` object.}}
6+
( ) `warn()` {{Incorrect because `console.warn()` is a valid method in the `Console` object.}}
7+
(x) `message()` {{Correct because `console.message()` is not a valid method in the `Console` object.}}
88

99
||The methods `console.log()` and `console.debug()` are commonly used when debugging. ||

0 commit comments

Comments
 (0)