JavaScript Frameworks: React, Vue, and Angular Essentials Quiz

  1. React Component Structure

    In React, which file extension is commonly used for defining components using JSX syntax?

    1. .vux
    2. .jsx
    3. .ngc
    4. .rct
    5. .jsv
  2. Vue Application Root

    Which option best describes the role of the root instance in a Vue application?

    1. It provides the main entry point and controls the entire Vue app
    2. It compiles scripts into binaries
    3. It performs network requests automatically
    4. It manages browser cookies
    5. It holds all HTML elements in memory
  3. Angular Templates

    Which syntax is used in Angular templates for data binding, such as displaying a variable's value?

    1. u003C% variable %u003E
    2. {{ variable }}
    3. u003Cu003C variable u003Eu003E
    4. [[ variable ]]
    5. ( variable )
  4. State in React

    In a React functional component, which hook allows you to manage state?

    1. grabState
    2. setData
    3. createState
    4. useState
    5. initState
  5. Vue Directive Usage

    Which directive is used in Vue to display an element only when a certain condition is true?

    1. a-when
    2. d-if
    3. v-if
    4. x-show
    5. v-show
  6. Angular Component Decorator

    Which decorator is used in Angular to define a class as a component?

    1. @Component
    2. @Comp
    3. @VueComponent
    4. @ReactComp
    5. @Angularize
  7. Virtual DOM Concept

    Which framework popularized the virtual DOM for efficient UI updates?

    1. Angular
    2. Vue
    3. Knockout
    4. React
    5. Svelte
  8. Props Passing in React

    How do React components typically receive data from their parent components?

    1. Via emits
    2. Via directives
    3. Via hooks
    4. Via binds
    5. Via props
  9. Vue Two-way Binding

    Which directive in Vue enables two-way data binding, such as connecting input elements with data?

    1. v-two-way
    2. v-data
    3. v-model
    4. v-link
    5. v-bind
  10. Angular Module Purpose

    What is the main function of a module in Angular applications?

    1. To compile HTML files
    2. To manage browser storage
    3. To organize related code such as components and services
    4. To store style sheets
    5. To handle server requests
  11. JSX Purpose in React

    What is the main purpose of JSX in React applications?

    1. To write UI components using HTML-like syntax in JavaScript
    2. To store data persistently
    3. To import modules dynamically
    4. To configure build tools
    5. To define API endpoints
  12. Vue Computed Properties

    Which feature in Vue allows you to define values that are calculated from existing data properties?

    1. Methods
    2. Services
    3. Watchers
    4. Computed properties
    5. Listeners
  13. Angular CLI Purpose

    How does the CLI tool help developers when building Angular applications?

    1. It scaffolds projects and generates files
    2. It builds desktop apps
    3. It hosts live servers
    4. It performs database queries
    5. It scans for malware
  14. Lifecycle Methods in React

    Which React functional component hook runs code once after the component mounts?

    1. useData
    2. useFetch
    3. useEffect
    4. useUpdate
    5. useLayout
  15. Vue List Rendering

    What is the correct Vue directive to loop through an array of items and render them in a list?

    1. v-loop
    2. v-items
    3. v-for
    4. v-repeat
    5. v-each