Warm-Up: Quiz

Open up this project and answer each question in the corresponding files.

  1. For each of the expressions below, True or False?

    1. 10 + 2 === 12
    2. "hello" !== "Hello"
    3. true
    4. 6 >= 6
  2. For each of the values below, What's the Data Type?

    1. "Hi"
    2. 6 + 4
    3. 6 + 4 === "Hi"
    4. prompt("Please enter a number")
    5. 9 * 2 / 5 + 8 - 10
    6. false
    7. document.querySelector("#id")
    8. 9 > 5
  3. What message will the user see?

     let x = 9;
    
     if (x >= 9) {
         x = 4;
     } else {
         x = 9;
     }
    
     alert(x);
    
  4. What's wrong with this function definition?

     doSomething() {
         alert("doing something");
     }
    
  5. In HTML, how would you create a button that executes a function named sayColor when clicked?

results matching ""

    No results matching ""