# Module quiz: navigation, updating and assets in React.js

1. **True or false? In React, you can use a ternary operator in a component's return statement in React.**
    
    * <mark>True</mark>
        
    * False
        
2. **React Router is...**
    
    * A built-in part of React-DOM.
        
    * <mark>A stand-alone package that you can add to a React app.</mark>
        
    * A built-in part of React.
        
3. **React Router has a** `<Link>` **element.**
    
    * <mark>True</mark>
        
    * False
        
4. **Please choose the valid command to install react-player.**
    
    * <mark>npm&nbsp;install&nbsp;react-player</mark>
        
    * npm-install react-player
        
    * npm-install-react-player
        
5. **True or false? webpack is a module bundler.**
    
    * <mark>True</mark>
        
    * False
        
6. **What will be the output of the code below?**
    
    ```javascript
    let name; if (Math.random() > 0.5) { name = "Mike"} else { name = "Susan"}
    ```
    
    * It will be 0.5
        
    * It will always be Susan
        
    * It will always be Mike
        
    * <mark>It will be sometimes Mike, and sometimes Susan, randomly</mark>
        
7. **Is the following component syntactically correct?**
    
    ```javascript
    import car from "./assets/images/car.jpg";
    
    function CarImage() {
       return ( 
          <img 
            height={200}
            src={car}
            alt="Car image" 
          />
       );
    };
    export default CarImage;
    ```
    
    * Yes
        
    * <mark>No</mark>
        
8. **What is an asset?**
    
    * <mark>Images, stylesheets, fonts</mark>
        
    * Components
        
    * Images, video, and components
        
9. **What is the syntax used to add a new dev dependency to a React app? Select all that apply.**
    
    * **n**ode init some-package-name
        
    * <mark>npm install –save-dev some-package-name</mark>
        
    * <mark>npm i –save-dev some-package-name</mark>
        
    * npm init some-package-name
        
10. **If your app can compile without it, you can keep an asset in a public folder.**
    
    * <mark>True</mark>
        
    * False
        

---

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1724043409397/57b4c8ff-ea1e-4479-a3ae-8855d87c5174.png align="center")
