Quiz Space

Modern Application Development II · End Term · 31 Aug 2025 · May 2025 term · Set QDB1

Question 16: Consider the following JavaScript program: What will be …

Question 16

+3 marksOne correct option

Consider the following JavaScript program:

javascript
class Vehicle {
constructor(brand) {
this.brand = brand;
}
start() {
console.log(`${this.brand} vehicle is starting`);
}
getInfo() {
return `This is a ${this.brand} vehicle`;
}
}
class Car extends Vehicle {
constructor(brand, model) {
super(brand);
this.model = model;
}
start() {
console.log(`${this.brand} ${this.model} engine started`);
}
}
const myCar = new Car('Toyota', 'Camry');
myCar.start();
console.log(myCar.getInfo());
console.log(myCar instanceof Car);
console.log(myCar instanceof Vehicle);
console.log(Car.prototype.__proto__ === Vehicle.prototype);

What will be the output of the above program on a browsers console?

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • A

Question 16 of 32 in the IIT Madras BS Modern Application Development II (MAD 2) End Term paper sat on 31 Aug 2025, in the May 2025 term (IIT M IMPROVEMENT AN EXAM QIB3 31 Aug 2025). It carries 3 marks.

More questions from this paper

  1. Q1In a message queue system, if the consumer is slower than the producer, what is likely to occur first?
  2. Q2Figure question
  3. Q3In Flask, what is the main benefit of using the @cache.cached() decorator?
  4. Q4What is the primary purpose of CORS (Cross-Origin Resource Sharing)?
  5. Q5Which of the following practices help protect against supply chain attacks?
  6. Q6Which of the following factors directly affect the speed and performance of a web page load?
  7. Q7Which of the following is/are the potential benefits of using a message broker?
  8. Q8Which statements about webhooks are correct?
  9. Q9A popular e-commerce platform needs to notify multiple third-party services (inventory management, email marketing, ana…
  10. Q10What is the main advantage of using caching in a Flask-based web application?
  11. Q11What will be the order of console output when the following JavaScript code is executed?
  12. Q12Consider the following Vue application with markup index.html and JavaScript file app.js. File: index.html File: script…
  13. Q13Consider the below JavaScript program. What will be the output of the above program, if executed? Also, predict the min…
  14. Q14Figure question
  15. Q15Consider the following Vue router configuration. If the app loads with userRole = 'user', what will be displayed?
  16. Q17Given the following parent-child component setup: Parent Component: App.vue Child Component: TaskList.vue Test Scenario…
  17. Q18Given the following parent-child component setup: Parent Component: App.vue Child Component: TaskList.vue Test Scenario…
  18. Q19Given the following parent-child component setup: Parent Component: App.vue Child Component: TaskList.vue Test Scenario…
  19. Q20Which factors directly impact the Lighthouse "Performance" score?
  20. Q21Which statements are true about handling background tasks in Flask with Celery?
  21. Q22Which of the following are true about mutations and actions in Vuex?
  22. Q23Figure question
  23. Q24Consider the following JavaScript program: What will be the output of the above program?
  24. Q25Consider the following JavaScript code snippet: What will be the output sequence?
  25. Q26What will this Promise chain output?
  26. Q27What happens when this Flask caching code runs? If requests for user IDs 1, 2, 1 are made within 5 minutes, what's the …
  27. Q28What happens when the following code is run in the browser (Vue 2 CDN used)?
  28. Q29What does this async/await code do? If the API returns 404 status, what gets logged?
  29. Q30Consider the following JavaScript program that demonstrates web storage operations: What will be the output of the abov…
  30. Q31Consider the following Flask application configuration for Flask-Security with the User and Role models properly define…
  31. Q32Consider the following endpoints created with a working set up of flask-security and flask-sqlalchemy. Three requests a…