Errors
Logic
Variable Types
HTML & CSS
JavaScript
100

Will the following code throw an error? 


console.log "Hello Error" 

Yes 

100

What is the output of the following code? 

if (2 > 1) {

  console.log(true); 

}

else {

  console.log(false); 

}

true

100

Which of the following is not a type of a variable:

1) Integer 

2) Float

3) Magnet  

4) Array 

3) Magnet 

100

Which text is selected:

<html>

<head>

  <style>

    h1 {color: red;   }

  </style></head>

<body>

  <h1>Hey</h1>

  <h2>Hello</h2></body></html>

"Hey"

100

Which of the following is not a valid DOM command:

-document.querySelector

-document.get Element By Id 

-document.setAttribute

-document.appendChild

document.get Element By Id 

200

Will the following code throw an error? 


var x=5;

var y=12356;

console.log(x+y);

No

200

What is the output of the following code? 

if (2 > 1 && 1 < 2) {

  console.log(true); 

}

else {

  console.log(false); 

}

true

200
What is the type of the following variable:

console.log(5 - 3);

Integer 

200

Given the two table codes, which ones best match the image shown in the notes? 

Code #1 

200

Which command can be used to change a HTML's button attribute:

-document.getElementById

-document.setAttribute

-document.querySelector

document.setAttribute

300

Given that this code is all at the same line, is it going to throw an error? 

var one = 5;   console.log(one + 3); console.log(1 - 2);

No 

300

What is the output of the following code? 

if (2 + 3 > 1 || 1 < 2) {

  console.log(true); 

}

else {

  console.log(false); 

}

true 

300

What is the type of the following variable:

console.log(3.6 - 2.1);

Float 

300

Which of the following HTML elements will make text bold:

1) <strong>

2) <red>

3) <html>

4) <script> 

<strong>

300

True or False: We can have a loop inside another loop

True 

400

In which line does the following code crash? 

var z = 2;

if z > 1 {

  console.log(b); 

}

Line 3: b is not defined

400

What is the output of the following code? 

if (2 - 3 === 1 && 1 !== 2) {

  console.log(true); 

}

else {

  console.log(false); 

}

false

400

What is the type of the following variable:

var a;

Undefined 

400

How many elements have a red color? 

<style>

.hey {color: red;}

</style>

<h1 class"hey">Hello</h1>

<h2 class="hey">Hi</h2>

<h3>

2

400

True or False: We can have a loop inside a function 

True
500

Will this code throw an error? If so, which line?  

for (i = 0; i < 3; i++) {

  console.log(i); 

}

Line 1: i is not defined using var. 

500

How many of the following statements are True?

console.log(1 === 2 && 1 >= 1);

console.log(2 > 3 || 1 < 2);

console.log((1 + 1) !== 2);

500

What is the type of the following code:

console.log(2 + "3");

String 

500

Which of the following displays a color panel: 

1) <input type="number"></input> 

2) <input id="text" type="text"></input> 

3) Both of the above

4) None of the above

4) None of the above

500

What is the output of the following code? 

function helloWorld() {

    console.log("hey");

}

No output, function wasn't called

M
e
n
u