Quiz Space

Modern Application Development II · Quiz 2 · 23 Nov 2025 · September 2025 term

Question 11: Consider in this code Vue.js 2 CDN is used. Index.html W…

Question 11

+3 marksOne or more correct options

Consider in this code Vue.js 2 CDN is used.

Index.html

html
<div id="app">
<ul>
<li v-for="user in users">{{ user.name }}</li>
</ul>
<button @click="fetchUsers">Load Users</button>
</div>
<script>
new Vue({
el: "#app",
data: { users: [] },
methods: {
fetchUsers() {
fetch("https://jsonplaceholder.typicode.com/users")
.then(res => res.json())
.then(data => { this.users = data; });
}
}
});
</script>

Which of the following statements is/are correct, assuming the given API is working?

Select all that apply.

  1. A

    Clicking the button fetches users and updates DOM.

  2. B

    Vue automatically re-renders the list when users changes.

  3. C

    v-for is used for conditional rendering.

  4. D

    The code demonstrates Vue’s reactivity system.

Show answer

Correct answers

  • A

    Clicking the button fetches users and updates DOM.

  • B

    Vue automatically re-renders the list when users changes.

  • D

    The code demonstrates Vue’s reactivity system.

Question 11 of 16 in the IIT Madras BS Modern Application Development II (MAD 2) Quiz 2 paper sat on 23 Nov 2025, in the September 2025 term (IIT M DIPLOMA AN EXAM QDD2 23 Nov 2025 NEW). It carries 3 marks.

More questions from this paper

  1. Q1Consider the following Vue application with markup "index.html" and JavaScript file "app.js". index.html: app.js: Suppo…
  2. Q2Consider the below JavaScript program. What will be the output of the above program?
  3. Q3Consider the below Vue component. What will be displayed in the <p> element after the button with text "Increment" is c…
  4. Q4Which of the following statement(s) is/are true about Vue.js event handling and communication?
  5. Q5Consider the below Vue class binding and select the most appropriate option(s)
  6. Q6Consider the below Vue router setup. What will be the behavior when the user visits "/user/john/posts"?
  7. Q7Consider the following Flask application configuration for Flask-Security, with the User and Role models properly defin…
  8. Q8When using Vue 2 via CDN in a plain HTML file, which of the following is the correct practice?
  9. Q9Considering that in this code Vue.js 2 CDN is used. Index.html Which of the following statements is/are true?
  10. Q10Which of the following is NOT true about Vuex compared to a Vue component?
  11. Q12Which statements are correct about cross-browser testing in Vue.js applications?
  12. Q13Consider this Vue 2 (CDN) method inside a component. If the ID of the user “Asha” in the database is 7, What will be st…
  13. Q14Which one of the following statements about Vuex is correct?
  14. Q15Consider the following Vue SFC. What finally appears on the browser?
  15. Q16Consider the following JavaScript code. What will be logged on the browser’s console?