# Module quiz: Introduction to JavaScript

1. **You can run JavaScript in a web browser's devtools console.**
    
    * true
        
    * false
        
2. **Which of the following are valid comments in JavaScript? Select all that apply.**
    
    * ```plaintext
          \ Comment 1
        ```
        
    * ```plaintext
          // Comment 2
        ```
        
    * ```plaintext
          ##
          ## Comment 3
          ##
        ```
        
    * ```plaintext
          /*
          * Comment 4
          */
        ```
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1721200485349/e7399ef4-cbc9-42cf-ba68-eac05f32696a.png align="center")
        
3. Which of the following are valid data types in JavaScript? Select all that apply.
    
    * <mark>string</mark>
        
    * <mark>numbers</mark>
        
    * <mark>booleans</mark>
        
    * null
        
4. Which of the following is the logical AND operator in JavaScript?
    
    * ```plaintext
          &
        ```
        
    * ```plaintext
          &&
        ```
        
    * ```plaintext
          ||
        ```
        
    * ```plaintext
          |\
        ```
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1721200494649/3c4ac47e-d988-4f4a-b012-c772eee54ee3.png align="center")
        
5. **Which of the following is the assignment operator in JavaScript?**
    
    * ```plaintext
          =
        ```
        
    * ```plaintext
          ==
        ```
        
    * ```plaintext
          ===
        ```
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1721200474206/ffe454fe-06eb-470b-a079-9f6829900b8b.png align="center")
        
6. **How many times will the following code print the word 'Hello'?**
    
    ```javascript
    for(var i = 0; i <= 5; i++) {
      console.log("Hello");
    }
    ```
    
    * 4
        
    * 5
        
    * <mark>6</mark>
        
7. **What will print out when the following code runs?**
    
    ```javascript
    var i = 3;
    var j = 5;
    
    if(i == 3 && j < 5) {
      console.log("Hello");
    } else {
      console.log("Goodbye");
    }
    ```
    
    * Hello
        
    * <mark>Goodbye</mark>
        
    * Nothing
        
8. **What will print out when the following code runs?**
    
    ```javascript
    var i = 7;
    var j = 2;
    
    if(i < 7 || j < 5) {
      console.log("Hello");
    } else {
      console.log("Goodbye");
    }
    ```
    
    * <mark>Hello</mark>
        
    * Goodbye
        
    * Nothing
        
9. **The result of** `!false` **is:**
    
    * <mark>true</mark>
        
    * undefined
        
10. **What does the operator symbol || represent in JavaScript?**
    
    * <mark>The logical OR operator</mark>
        
    * The logical NOT operator
        
    * The logical AND operator
