MAD Study Hub

Home / Past papers / MAD2 End Term / this paper

IIT M DIPLOMA AN EXAM QDD3 31 Aug - 31 Aug 2025

MAD2 End Term32 questions100 marks21 MCQ · 11 MSQDiploma / afternoon / QDD3
Elapsed 00:00
Q1MCQ2 marks
In a message queue system, if the consumer is slower than the producer, what is likely to occur first?
  1. Messages will be dropped
  2. Messages will accumulate in the queue
  3. The consumer will speed up automatically
  4. The producer will block until the consumer is ready
Q2MCQ2 marks
What does "reactivity" mean in the context of frontend frameworks like Vue.js?
  1. The component will reload when data changes
  2. All function calls become asynchronous
  3. It disables direct access to state
  4. The DOM updates automatically when the underlying reactive data changes
Q3MCQ2 marks
In Flask, what is the main benefit of using the @cache.cached() decorator?
  1. It stores output in session storage
  2. It enables token authentication
  3. It sends compressed response headers
  4. It skips route execution for repeated inputs
Q4MCQ2 marks
What is the primary purpose of CORS (Cross-Origin Resource Sharing)?
  1. To encrypt data between client and server
  2. To compress HTTP responses
  3. To authenticate users across applications
  4. To control which domains can access resources
Q5MSQ2 marksselect all that apply
Which of the following practices help protect against supply chain attacks?
  1. Storing keys only in environment variables
  2. Version pinning
  3. Using only packages with over 1000 stars on GitHub
  4. Reduce Dependencies
Q6MSQ2 marksselect all that apply
Which of the following factors directly affect the speed and performance of a web page load?
  1. The number of CSS selectors in the stylesheet
  2. Use of semantic HTML tags
  3. Number of HTTP requests made
  4. File size of resources (like images, JS)
Q7MSQ2 marksselect all that apply
Which of the following is/are the potential benefits of using a message broker?
  1. A message broker makes the network scalable for adding more servers to thenetwork.
  2. A message broker allows two servers in a network to directly communicatewith each other, without an intermediary.
  3. A message broker is not suited in case of traffic spikes, as messages areretained in the queue until processed.
  4. A message broker can be used for batch processing of messages.
Q8MSQ2 marksselect all that apply
Which statements about webhooks are correct?
  1. They enable real-time data delivery
  2. They use HTTP POST requests typically
  3. They're designed for server-to-server communication
  4. They require polling from the client
Q9MCQ3 marks
A popular e-commerce platform needs to notify multiple third-party services (inventory management, email marketing, analytics) whenever a customer places an order. The development team is considering different approaches to handle these notifications. Scenario: When an order is placed, the system needs to: ● Update inventory levels in an external warehouse system ● Send a welcome email through a third-party email service ● Log analytics data to an external tracking service ● Update customer loyalty points in a CRM system Which of the following statements about using webhooks for this scenario is MOST accurate?
  1. Webhooks are not suitable for this use case because they require the e-commerce platform to continuously poll each third-party service to check if they're ready to receive data, which would create unnecessary network overhead.
  2. Webhooks should be avoided in this scenario because they operatesynchronously, meaning the customer's order placement would be delayed until all third-party services have successfully processed their notifications.
  3. Webhooks provide an ideal solution as they allow the e-commerce platform topush real-time notifications to all subscribed third-party services immediately when an order is placed, eliminating the need for these services to repeatedly poll for updates.
  4. Webhooks are primarily designed for read-only operations and cannot handlecomplex data payloads like order information, making them unsuitable for e-commerce transaction notifications.
Q10MCQ3 marks
What is the main advantage of using caching in a Flask-based web application?
  1. It eliminates the need for client-side rendering
  2. It reduces server load by reusing responses for repeated requests
  3. It encrypts data transmission between server and client
  4. It avoids the need for database interactions completely
Q11MCQ3 marks
question figure
Text of the picture (copyable)
What will be the order of console output when the following JavaScript code is executed?

```javascript
async function test() {
  console.log("P");
  await Promise.resolve();
  console.log("Q");
}
console.log("R");
test();
console.log("S");
```
  1. R P Q S
  2. P R S Q
  3. R S P Q
  4. R P S Q
Q12MCQ3 marks
question figure
Text of the picture (copyable)
Consider the following JavaScript program:

```javascript
const user = {
    name: 'Alice',
    age: 25,
    city: 'Boston',
    country: 'USA'
};

const { name, city, ...otherInfo } = user;
const newUser = { name, location: city, ...otherInfo };

console.log(name);
console.log(otherInfo);
console.log(newUser);
```

What will be the output of the above program?
  1. question figure
    text
    ```
    Alice
    { city: 'Boston', age: 25, country: 'USA' }
    { name: 'Alice', location: 'Boston', city: 'Boston', age: 25,
    country: 'USA' }
    ```
  2. question figure
    text
    ```
    Alice
    { age: 25, country: 'USA' }
    { name: 'Alice', location: 'Boston', city: 'Boston', age: 25,
    country: 'USA' }
    ```
  3. question figure
    text
    ```
    Alice
    { age: 25, country: 'USA' }
    { name: 'Alice', location: 'Boston', age: 25, country: 'USA' }
    ```
  4. question figure
    text
    ```
    undefined
    { name: 'Alice', city: 'Boston', age: 25, country: 'USA' }
    { name: 'Alice', location: 'Boston' }
    ```
Q13MCQ3 marks
Consider the following javascript program. question figure Consider the following javascript program. What will be the output of the above program on the browser’s console?
Text of the picture (copyable)
```javascript
new Promise((resolve, reject) => {
  const score = 0.45;
  if (score >= 0.5) {
    resolve(score);
  } else {
    reject(new Error("Score too low"));
  }
})
  .then(data => {
    console.log("Stage A:", data);
    return data * 10;
  })
  .catch(error => {
    console.log("Stage B:", error.message);
    return 3;
  })
  .then(data => {
    console.log("Stage C:", data);
    if (data < 5) {
      throw new Error("Value below threshold");
    }
    return data + 2;
  })
  .then(data => {
    console.log("Stage D:", data);
    return data / 2;
  })
  .catch(error => {
    console.log("Stage E:", error.message);
    if (error.message === "Value below threshold") {
      return "Recovered";
    }
    throw error;
  })
  .then(data => {
    console.log("Stage F:", data);
    if (data === "Recovered") {
      return 10;
    }
    return data * 4;
  })
  .finally(() => {
    console.log("Stage G: Cleanup completed");
  });
```
  1. question figure
    text
    ```text
    Stage A: 0.45
    Stage C: 4.5
    Stage D: 6.5
    Stage F: 26
    Stage G: Cleanup completed
    ```
  2. question figure
    text
    ```text
    Stage B: Score too low
    Stage C: 3
    Stage E: Value below threshold
    Stage F: Recovered
    Stage G: Cleanup completed
    ```
  3. question figure
    text
    Stage A: 0.45
    Stage C: 4.5
    Stage E: Value below threshold
    Stage F: Recovered
    Stage G: Cleanup completed
  4. question figure
    text
    ```
    Stage B: Score too low
    Stage C: 3
    Stage D: 5
    Stage F: 20
    Stage G: Cleanup completed
    ```
Q14MCQ3 marks
question figure
Text of the picture (copyable)
Consider this HTML and Vue setup:

index.html
```html
<div id="app1">{{ message }}</div>
<div id="app2">{{ message }}</div>
<script src="app.js" ></script>
```

app.js
```javascript
new Vue({
  el: '#app1',
  data: { message: 'Hello from App 1' }
});

new Vue({
  el: '#app2',
  data: { message: 'Hello from App 2' }
});
```

What will be rendered on the browser?
  1. App 1 only shows data
  2. Both show “Hello from App 2”
  3. Both show “Hello from App 1”
  4. Each renders its own message independently
Q15MCQ3 marks
question figure
Text of the picture (copyable)
Consider the following JavaScript code running in a browser:

```javascript
localStorage.setItem('score', '10');
sessionStorage.setItem('multiplier', '3');

for (let i = 0; i < 2; i++) {
    let score = localStorage.getItem('score');
    let multiplier = sessionStorage.getItem('multiplier');

    score = score + 5;
    multiplier = multiplier * 2;

    localStorage.setItem('score', score);
    sessionStorage.setItem('multiplier', multiplier);
}

console.log(localStorage.getItem('score'));
console.log(sessionStorage.getItem('multiplier'));
```

What will be the output in the browser console?
  1. question figure
    text
    20
    12
  2. question figure
    text
    20
    NaN
  3. question figure
    text
    NaN
    12
  4. question figure
    text
    None of these
Q16MSQ3 marksselect all that apply
Which factors directly impact the Lighthouse "Performance" score?
  1. First Contentful Paint (FCP)
  2. Time to Interactive (TTI)
  3. Layout Shift
  4. HTTPS usage
Q17MSQ3 marksselect all that apply
Which statements are true about handling background tasks in Flask with Celery?
  1. Using time.sleep() blocks the event loop and is recommended for async tasks
  2. Celery allows long-running tasks to be executed asynchronously
  3. Polling is a strategy to check task status periodically
  4. Flask + Celery + Redis is a common stack for async task management
Q18MSQ3 marksselect all that apply
Which of the following are true about mutations and actions in Vuex?
  1. Actions can be asynchronous
  2. Only actions can call APIs through fetch call
  3. Mutations should modify state directly
  4. Mutations can be asynchronous
Q19MSQ3 marksselect all that apply
question figure
Text of the picture (copyable)
Consider the below Vue class binding and select the most appropriate option(s):

```html
<div v-bind:class="{ active: isActive, 'text-bold': hasBoldText, disabled: !isEnabled }"></div>
```
  1. The class "active" will only be applied to the div element if the variable"isActive" evaluates to true.
  2. The class "disabled" will be applied to the div element when the variable"isEnabled" evaluates to false.
  3. The class "text-bold" will always be applied to the div element regardless ofthe "hasBoldText" variable value.
  4. All three classes ("active", "text-bold", "disabled") will always be applied to thediv element.
  5. If "isEnabled" is undefined, the "disabled" class will not be applied to the divelement.
  6. The class "text-bold" will only be applied if the variable "hasBoldText" existsand evaluates to a truthy value.
Comprehension passage - the questions below it refer to this
question figure Scenario 1. The component is loaded. 2. User clicks "Mark Complete" for the task named Build Project. 3. User clicks "Show Completed" button again. question figure
Q20MCQ3 marks
After step 2 (Mark Completed is clicked), what tasks are shown?
  1. Learn Vue
  2. Learn Vue, Build Project, Test App
  3. Test App only
  4. None
Q21MCQ3 marks
After step 3 (Mark Complete is clicked on Build Project), how many completed tasks are reported in the UI?
  1. 1
  2. 2
  3. 3
  4. 0
Q22MSQ3 marksselect all that apply
Which of the following are true about this component’s behavior?
  1. question figure
    text
    The `filteredTasks` logic won't work properly if we used arrow functions for the `filter` method.
  2. question figure
    text
    Using non-arrow functions in computed properties allows correct this access to Vue instance.
  3. question figure
    text
    ```
    filteredTasks and completedCount will both update reactively when a task's
    status is changed.
    ```
  4. question figure
    text
    The `@click='markComplete(task.id)'` usage correctly preserves reactivity.
Q23MCQ4.5 marks
question figure
Text of the picture (copyable)
Consider the following JavaScript code:

```javascript
const globalVar = 100;
var value = 200;

const calculator = {
  value: 50,

  compute: function() {
    const innerObj = {
      value: 25,

      regularMethod: function() {
        return this.value;
      },

      arrowMethod: () => {
        return this.value;
      },

      mixedMethod: function() {
        const arrowInside = () => this.value;
        return arrowInside();
      }
    };
    return {
      regular: innerObj.regularMethod(),
      arrow: innerObj.arrowMethod(),
      mixed: innerObj.mixedMethod()
    };
  }
};

const result = calculator.compute();
console.log(result.regular);
console.log(result.arrow);
console.log(result.mixed);
```

Assuming this code runs in a browser environment, what will be the output?
  1. question figure
    text
    25
    200
    50
  2. question figure
    text
    25
    50
    25
  3. question figure
    text
    50
    200
    50
  4. question figure
    text
    25
    200
    25
Q24MCQ4.5 marks
question figure
Text of the picture (copyable)
Consider this Vue.js component code:

```javascript
const TodoApp = {
  template: `
    <div>
      <input v-model="newTodo" @keyup.enter="addTodo" />
      <ul>
        <li v-for="todo in todos" :key="todo.id">{{ todo.text }}</li>
      </ul>
    </div>
  `,
  data() {
    return {
      newTodo: '',
      todos: []
    }
  },
  methods: {
    addTodo() {
      if (this.newTodo) {
        this.todos.push({ id: Date.now(), text: this.newTodo });
        this.newTodo = '';
      }
    }
  }
}
```

What happens when a user types "Learn Vue" into the input field and presses Enter?

Note: The `@keyup.enter` directive calls `addTodo()` when the Enter key is pressed.
  1. question figure
    text
    An error occurs because the todos array is empty
  2. question figure
    text
    The input is cleared, and Learn Vue appears in the list
  3. question figure
    text
    Only the input is cleared, no todo is added
  4. question figure
    text
    The page refreshes
Q25MCQ4.5 marks
question figure
Text of the picture (copyable)
Given this Vue Router setup:

```javascript
const routes = [
  { path: '/user/:id/profile', component: UserProfile },
  { path: '/user/:id', component: User },
  { path: '*', component: NotFound },
  { path: '/user/:id/settings', component: UserSettings },
];
```

What component renders for URL /user/123/settings?
  1. UserProfile
  2. User
  3. NotFound
  4. UserSettings
Q26MCQ4.5 marks
question figure
Text of the picture (copyable)
Given the Flask app:

```python
from flask import Flask
from flask_cors import CORS

app = Flask(__name__)
CORS(app, resources={r"/api/*": {"origins": "http://localhost:3000"}})

@app.route('/api/data')
def data():
    return {"msg": "Success"}
```

frontend code:

```javascript
fetch("http://localhost:5000/api/data")
    .then(res => res.json())
    .then(data => console.log(data));
```

What will happen when run from a Vue app hosted at http://localhost:5173?
  1. Request succeeds
  2. CORS error occurs
  3. 404 error
  4. The server crashes
Q27MCQ4.5 marks
question figure
Text of the picture (copyable)
What will this JavaScript code output?

```javascript
function createCounter() {
  let count = 0;
  return function() {
    count++;
    return count;
  };
}

const counter1 = createCounter();
const counter2 = createCounter();

console.log(counter1());
console.log(counter1());
console.log(counter2());
```
  1. question figure
    text
    1
    2
    3
  2. question figure
    text
    1
    2
    1
  3. question figure
    text
    ```
    1
    1
    1
    ```
  4. question figure
    text
    ```
    undefined
    undefined
    undefined
    ```
Q28MSQ4.5 marksselect all that apply
Assuming that the root Vue instance has already been created and mounted to div app. Which of the following statements are CORRECT? question figure
Text of the picture (copyable)
Consider the following Vue component structure with nested components and
complex slot configurations:

```javascript
Vue.component('data-provider', {
  template: `
    <div class="provider">
      <slot name="header" :user="currentUser" :loading="isLoading"></slot>
      <slot name="content" :items="filteredItems" :count="itemCount"></slot>
      <slot :fallback="defaultMessage" :error="errorState"></slot>
    </div>
  `,
  data() {
    return {
      currentUser: { name: 'John', role: 'admin' },
      isLoading: false,
      filteredItems: ['item1', 'item2', 'item3'],
      itemCount: 3,
      defaultMessage: 'No data available',
      errorState: null
    }
  }
});

Vue.component('parent-component', {
  template: `
    <data-provider>
      <template v-slot:header="{ user, loading }">
        <h1 v-if="!loading">Welcome {{ user.name }}</h1>
        <span v-else>Loading...</span>
      </template>

      <template v-slot:content="slotProps">
        <ul>
          <li v-for="item in slotProps.items" :key="item">
            {{ item }} ({{ slotProps.count }} total)
          </li>
        </ul>
      </template>

      <template v-slot:default="defaultProps">
        <p>{{ defaultProps.fallback }}</p>
      </template>
    </data-provider>
  `
});
```

Now consider this usage of the parent-component:

```html
<div id="app">
  <parent-component></parent-component>
</div>
```
  1. The header slot will display "Welcome John" when loading is true
  2. The content slot will render 3 list items with "item1 (3 total)", "item2 (3 total)","item3 (3 total)"
  3. The default slot will display "No data available" from the fallback prop
  4. If we change isLoading: true in data-provider, the header will show"Loading..."
  5. Changing v-slot:default to just v-slot in parent-component would break thefunctionality
Comprehension passage - the questions below it refer to this
Answer the given Subquestions:
Q29MCQ4.5 marks
Consider the following Vue Router configuration in a Vue 2 application: question figure Consider the following Vue Router configuration in a Vue 2 application: In a Vue component, you have these navigation methods: question figure Consider the following Vue Router configuration in a Vue 2 application: In a Vue component, you have these navigation methods: What URLs will be generated when the user clicks each navigation element?
Text of the picture (copyable)
```javascript
const routes = [
  {
    path: '/',
    name: 'Home',
    component: HomeView
  },
  {
    path: '/user/:id',
    name: 'UserProfile',
    component: UserProfile
  },
  {
    path: '/product/:category/:id',
    name: 'ProductDetail',
    component: ProductDetail
  }
];
```
```html
<template>
  <div>
    <button @click="goToUser">View User</button>
    <button @click="goToProduct">View Product</button>
    <router-link :to="{ name: 'Home' }">Home</router-link>
  </div>
</template>

<script>
export default {
  methods: {
    goToUser() {
      this.$router.push({ name: 'UserProfile', params: { id: 123 } });
    },
    goToProduct() {
      this.$router.push({ name: 'ProductDetail',
                           params: { category: 'electronics', id: 456}
                         });
    },
    navigateOne() {
      this.$router.push({ name: 'UserProfile', params: { id: 555 },
                           query: { tab: 'settings'}
                         });
    },
    navigateTwo() {
      this.$router.replace({ name: 'Home' });
    },
    goBack() {
      this.$router.go(-1);
    }
  }
}
</script>
```
  1. User button: /user,Product button: /product, Home link: /home
  2. User button: /user/123,Product button: /product/electronics/456, Home link: /
  3. User button: /UserProfile/123,Product button: /ProductDetail/electronics/456, Home link: /Home
  4. User button: /user?id=123,Product button: /product?category=electronics&id=456, Home link: /
Q30MSQ4.5 marksselect all that apply
Using the same Vue Router configuration from the previous question, Select ALL correct statements about these navigation methods.
  1. The "View User" link will navigate to /user/789 and match the UserProfile route
  2. The navigateOne() method will create URL /user/555?tab=settings
  3. The $router.replace() method adds a new entry to the browser history
  4. The $router.go(-1) method navigates to the previous page in browser history
Comprehension passage - the questions below it refer to this
Prashant and Nikita are creating a quiz question paper collaboratively. They are each working on different sections — and complete their tasks in parallel. Meanwhile, Mayur is enjoying a single-player game that finishes when the game loop ends. To compare productivity: ● If Prashant and Nikita (together) finish faster than Mayur, the winner is "Team". ● If Mayur finishes faster, he wins. ● If both take the same time, Mayur wins by default. You are simulating this scenario in the browser.Prashant and Nikita are represented using parallel Promises. Mayur is represented using a single Promise. The frontend must calculate who finishes first using asynchronous logic, and display the result. question figure Prashant and Nikita are creating a quiz question paper collaboratively. They are each working on different sections — and complete their tasks in parallel. Meanwhile, Mayur is enjoying a single-player game that finishes when the game loop ends. To compare productivity: ● If Prashant and Nikita (together) finish faster than Mayur, the winner is "Team". ● If Mayur finishes faster, he wins. ● If both take the same time, Mayur wins by default. You are simulating this scenario in the browser.Prashant and Nikita are represented using parallel Promises. Mayur is represented using a single Promise. The frontend must calculate who finishes first using asynchronous logic, and display the result. Based on the above data, answer the given subquestions.
Q31MCQ3 marks
If Prashant and Nikita finish together in 3 seconds (since Promise.all waits for both), and Mayur finishes in 4 seconds, who wins?
  1. Mayur
  2. Team
  3. Nikita
  4. Race condition prevents output
Q32MCQ3 marks
The Team takes 5 seconds in total. Mayur takes 2 seconds. According to the logic of app2.js, who is the winner? question figure
Text of the picture (copyable)
app2.js
```javascript
async function playGame() {
  const start = Date.now();

  const prashantPromise = new Promise(resolve =>
    setTimeout(resolve, 3000));
  const nikitaPromise = new Promise(resolve =>
    setTimeout(resolve, 2000));
  const mayurPromise = new Promise(resolve =>
    setTimeout(resolve, 2000));

  await Promise.all([prashantPromise, nikitaPromise]);
  const teamTime = Date.now() - start;

  await mayurPromise;
  const mayurTime = Date.now() - start;

  const winner = (teamTime < mayurTime) ? "Team" : "Mayur";
  console.log(`Winner is: ${winner}`);
}
```
  1. Mayur
  2. Team
  3. Nikita
  4. Error due to async logic

Answer key

  1. Q1 (MCQ, 2 marks): B
  2. Q2 (MCQ, 2 marks): D
  3. Q3 (MCQ, 2 marks): D
  4. Q4 (MCQ, 2 marks): D
  5. Q5 (MSQ, 2 marks): B, D
  6. Q6 (MSQ, 2 marks): C, D
  7. Q7 (MSQ, 2 marks): A, D
  8. Q8 (MSQ, 2 marks): A, B, C
  9. Q9 (MCQ, 3 marks): C
  10. Q10 (MCQ, 3 marks): B
  11. Q11 (MCQ, 3 marks): D
  12. Q12 (MCQ, 3 marks): C
  13. Q13 (MCQ, 3 marks): B
  14. Q14 (MCQ, 3 marks): D
  15. Q15 (MCQ, 3 marks): D
  16. Q16 (MSQ, 3 marks): A, B, C
  17. Q17 (MSQ, 3 marks): B, C, D
  18. Q18 (MSQ, 3 marks): A, B, C
  19. Q19 (MSQ, 3 marks): A, B, F
  20. Q20 (MCQ, 3 marks): A
  21. Q21 (MCQ, 3 marks): B
  22. Q22 (MSQ, 3 marks): C, D
  23. Q23 (MCQ, 4.5 marks): B
  24. Q24 (MCQ, 4.5 marks): B
  25. Q25 (MCQ, 4.5 marks): C
  26. Q26 (MCQ, 4.5 marks): B
  27. Q27 (MCQ, 4.5 marks): B
  28. Q28 (MSQ, 4.5 marks): B, C, D
  29. Q29 (MCQ, 4.5 marks): B
  30. Q30 (MSQ, 4.5 marks): B, D
  31. Q31 (MCQ, 3 marks): B
  32. Q32 (MCQ, 3 marks): A

Concepts this paper tests

Auto-generated summary from the source site. Handy as a checklist; the lessons above explain each idea from scratch.

Here’s a structured summary of the core topics, concepts, principles, and equations (where applicable) for the "Diploma Level: Modern Application Development II" exam, along with Mermaid knowledge graphs to visualize relationships.



Core Topics & Concepts Summary

1. Asynchronous JavaScript & Promises

// Promise.all (waits for all promises) Promise.all([promise1, promise2]).then(values => { /* ... */ });

// Promise.race (resolves/rejects when the first promise settles) Promise.race([promise1, promise2]).then(value => { /* ... */ }); ```


2. Vue.js Fundamentals

// Vue Router Configuration const routes = [ { path: '/user/:id', name: 'UserProfile', component: UserProfile }, { path: '/product/:category/:id', component: ProductDetail } ]; ```


3. Frontend Performance Optimization


4. Backend & API Development (Flask)

app = Flask(_name_) CORS(app) # Allow all origins (or restrict with resources) cache = Cache(app, config={'CACHE_TYPE': 'simple'})

@app.route('/api/data') @cache.cached(timeout=50) # Cache for 50 seconds def get_data(): return {"data": "cached_response"} ```


5. Message Queues & Brokers


6. Security Best Practices


7. State Management in Vue (Vuex)


8. JavaScript ES6+ Features


9. HTTP & REST APIs


10. Testing & Debugging



Graph 2: Vue.js Core Concepts

Graph 3: Backend & API Development

Graph 4: Message Queues & Webhooks

Graph 5: Frontend Performance

Graph 6: Vuex State Management

Graph 7: Security Best Practices


Key Equations (Mathematics/Performance)

While this exam is primarily conceptual, here are performance-related formulas to remember:

  1. Page Load Time: `` Total Load Time = DNS Lookup + TCP Handshake + Request/Response Time + Rendering Time ``
  2. Lighthouse Score Weighting (approximate): `` Performance Score = 0.3*FCP + 0.3*TTI + 0.2*CLS + 0.2*Other Metrics ``
  3. Promise Race/All Time:

    • Promise.race: Resolves in min(T1, T2, ..., Tn).
    • Promise.all: Resolves in max(T1, T2, ..., Tn).

Exam Tips

  1. Vue.js:

    • Reactivity is automatic (DOM updates when data changes).
    • v-slot syntax is critical for scoped slots.
    • Vuex mutations must be synchronous.
  1. JavaScript:

    • Promise.race vs. Promise.all: Know which resolves first vs. waits for all.
    • Closures: Inner functions remember their outer scope.
  1. Flask:

    • @cache.cached skips route execution for repeated inputs.
    • CORS errors occur if the frontend domain isn’t whitelisted.
  1. Message Queues:

    • If the consumer is slow, messages accumulate (don’t drop unless the queue has a limit).
  1. Performance:

    • FCP/TTI/CLS are core Lighthouse metrics.
    • Reduce HTTP requests and file sizes for faster loads.
  1. Security:

    • Version pinning and fewer dependencies mitigate supply chain attacks.

Final Notes