JavaScript

Lesson 10 of 11

Quiz ยท 8 min

Quiz, JavaScript basics

Answer all ten questions, then press Check my answers. You need 70% to pass. If you do not pass, read the explanations and try again.

Question 1 of 10

Which keyword makes a variable that you plan to change later?

Question 2 of 10

What does this code print?

const name = 'Sam';
console.log(`Hi, ${name}!`);
Question 3 of 10

What is the value of 17 % 5?

Question 4 of 10

What is 'hello'[1]?

Question 5 of 10

Which operator compares two values to see if they are equal?

Question 6 of 10

When is a && b true?

Question 7 of 10

How many times does this loop run its body?

for (let i = 0; i < 4; i++) {
  console.log(i);
}
Question 8 of 10

What is scores.length when const scores = [10, 7, 9];?

Question 9 of 10

Which statements about return are true? Choose all that apply.

Choose all answers that apply.

Question 10 of 10

How do you read the age property of an object named pet?

Answer every question to check.