MAD Study Hub

Home / Past papers / MAD2 End Term / this paper

IIT M FOUNDATION DIPLOMA FN EXAM - 22 Dec 2024

MAD2 End Term32 questions100 marks29 MCQ · 3 MSQFoundation / Diploma / forenoon
Elapsed 00:00
Q1MCQ3 marks
Which of the following statements is true about closures in JavaScript?
  1. A closure can access variables from its outer function even after the outerfunction has returned.
  2. A closure can be created when a function is defined inside another function.
  3. Closures are useful for data encapsulation and controlling access to privatedata.
  4. All of these.
Q2MCQ3 marks
question figure
Text of the picture (copyable)
Consider the below JavaScript program.

```javascript
console.log("Start");

setTimeout(function() {
  console.log("Inside Timeout");
}, 0);

Promise.resolve().then(function() {
  console.log("Inside Promise");
});

console.log("End");
```

What will be the output of the above program?
  1. StartInside Timeout Inside Promise End
  2. StartInside Promise Inside Timeout End
  3. StartEnd Inside Timeout Inside Promise
  4. StartEnd Inside Promise Inside Timeout
Q3MCQ3 marks
question figure
Text of the picture (copyable)
Consider the below JavaScript program.

```javascript
function Person(name) {
  this.name = name;
}

Person.prototype.greet = function() {
  console.log("Hello, " + this.name);
};

const john = new Person("John");
john.greet();

delete john.greet;
john.greet();
```

What will be the output of the above program?
  1. Hello, JohnTypeError: john.greet is not a function
  2. Hello, JohnHello, undefined
  3. TypeError: john.greet is not a functionTypeError: john.greet is not a function
  4. Hello, JohnHello, John
Q4MCQ3 marks
question figure
Text of the picture (copyable)
Consider the below Vue app.

```javascript
new Vue({
  el: '#app',
  data: {
    user: {
      name: 'Abhi',
      age: 30
    }
  },
  watch: {
    user: {
      handler(newValue, oldValue) {
        console.log('User object changed:', newValue);
      },
      deep: true
    }
  }
});
```

What will happen if the following code is executed?
app.user.name = "Dev"
  1. The watcher will not be triggered because “name” is a nested property of“user” object.
  2. The watcher will be triggered and log "User object changed: { name: 'Bob',age: 30 }".
  3. The watcher will be triggered, but it will only log the new “name” value, i.e.,“Dev”, and not the entire user object.
  4. The watcher will throw an error because deep watching is not supported onnested objects.
Q5MCQ3 marks
question figure
Text of the picture (copyable)
Consider the below Vue component.

```html
<template>
  <div>
    <p v-if="isVisible">This paragraph is visible</p>
    <p v-else>This paragraph is hidden</p>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        isVisible: true
      };
    }
  };
</script>
```

What will happen when "this.isVisible = false" is executed?
  1. The paragraph with the text “This paragraph is visible” will be displayed.
  2. The paragraph with the text “This paragraph is hidden” will be displayed.
  3. Both paragraphs will be displayed because of the v-if and v-else bindings.
  4. No change will happen since v-if and v-else do not update the DOM.
Q6MCQ3 marks
question figure
Text of the picture (copyable)
In the following code, which attributes ensure that the cookie will only be sent over HTTPS and restrict it from cross-site requests?

```
response.set_cookie('session_id', 'abc123', secure=option1, samesite=option2)
```
  1. secure=True and samesite='Strict'
  2. secure=False and samesite='Strict'
  3. secure=True and samesite='None'
  4. secure=False and samesite='Lax'
Q7MCQ3 marks
question figure
Text of the picture (copyable)
Consider the following JavaScript code.

```javascript
function addItemToCart(item) {
  let cart = JSON.parse(localStorage.getItem('cart')) || [];
  cart.push(item);
  localStorage.setItem('cart', JSON.stringify(cart));
}

function getCartItems() {
  return JSON.parse(localStorage.getItem('cart')) || [];
}

addItemToCart({ id: 1, name: 'Laptop' }.name);
console.log(getCartItems());
```

The above code is initially loaded on the browser and then the browser is refreshed two times.
What will be the final output?
  1. []
  2. ['Laptop', ‘Laptop’, ‘Laptop’]
  3. [{ id: 1, name: 'Laptop' }]
  4. [undefined]
Q8MCQ3 marks
Which of the following is true regarding long polling?
  1. Long polling opens multiple connections between the client and the server,and the server continuously sends updates to the client in real-time.
  2. Long polling involves the client repeatedly sending requests at fixed intervalsto the server to check for updates, regardless of whether new data is available.
  3. Long polling allows the client to make a single request to the server, where theserver holds the connection open until new data is available and then sends the response.
  4. Long polling uses WebSockets to maintain a persistent, bidirectionalconnection between the client and the server.
Q9MCQ3 marks
question figure
Text of the picture (copyable)
What's the issue with this Vuex mutation? Assuming this mutation is part of vuex store.

```javascript
mutations: {
  updateUser(state, userData) {
    state.user = userData
    state.lastUpdated = Date.now()
    if (userData.role === 'admin') {
      fetchAdminData().then(data => {
        state.adminData = data
      })
    }
  }
}
```
  1. Multiple state changes in one mutation
  2. Async operation in mutation
  3. Direct state mutation
  4. Both Multiple state changes in one mutation and Async operation in mutation
Q10MCQ3 marks
question figure
Text of the picture (copyable)
Suppose you want the user data to only be accessible by an authenticated user.
What security issue exists in this code?

// Javascript
```javascript
methods: {
  async fetchUserData() {
    const response = await fetch(`/api/user/${this.userId}`)
    const data = await response.json()
    this.userData = data
  }
}
```

# Flask route
```python
@app.route('/api/user/<user_id>')
def get_user(user_id):
  query = f"SELECT * FROM users WHERE id = {user_id}"
  result = db.execute(query)
  return jsonify(result)
```
  1. No authentication check
  2. SQL injection vulnerability
  3. Unvalidated user input
  4. All of these
Q11MCQ3 marks
question figure
Text of the picture (copyable)
Given this Vue component structure:

```javascript
Vue.component('child', {
  template: `
    <div>
      <slot name="header" :info="info"></slot>
      <slot :info="info"></slot>
    </div>
  `,
  data() {
    return {
      info: { title: 'Hello', desc: 'World' }
    }
  }
})
```

Which slot usage is correct?
  1. question figure
    text
    ```html
    <template v-slot:header="data">{{data.title}}</template>
    ```
  2. question figure
    text
    ```html
    <template v-slot:header="{ info }">{{info.title}}</template>
    ```
  3. question figure
    text
    ```html
    <template v-slot:header>{{info.title}}</template>
    ```
  4. question figure
    text
    ```html
    <template v-slot:header=info>{{info.title}}</template>
    ```
Q12MCQ3 marks
What will be the output on the console? question figure
Text of the picture (copyable)
Consider the following JavaScript code snippet.

```javascript
Promise.resolve(1)
  .then(x => x + 1)
  .then(x => Promise.resolve(x + 1))
  .then(x => { throw 'error' })
  .catch(e => e + 4)
  .then(x => console.log(x))
```
  1. error4
  2. 7
  3. error
  4. undefined
Q13MCQ3 marks
question figure
Text of the picture (copyable)
consider the following javascript code snippet.

```javascript
async function test() {
    console.log("Start");
    const val = await Promise.resolve(5);
    console.log(val);
    return "End";
}

console.log("Begin");
test().then(data => console.log(data));
console.log("Finish");
```

What will be the output sequence?
  1. Begin, Start, 5, End, Finish
  2. Begin, Finish, Start, 5, End
  3. Begin, Finish, Start, End, 5
  4. Begin, Start, Finish, 5, End
Q14MCQ3 marks
Which of the following best describes the difference between @cache.memoize() and @cache.cached() in Flask-Caching?
  1. question figure
    text
    ```
    @cache.memoize() caches function results based on arguments, while
    @cache.cached() caches entire views.
    ```
  2. question figure
    text
    ```
    @cache.cached() caches function results based on arguments, while
    @cache.memoize() caches entire views.
    ```
  3. question figure
    text
    Both cache entire views, but `@cache.memoize()` uses Redis by default.
  4. question figure
    text
    Both methods are identical but use different syntax.
Q15MCQ3 marks
question figure
Text of the picture (copyable)
Consider the following Script embedded in an HTML document.

```javascript
let x = [100, 'x', num => num + 1];

for (const i = 0; i<x.length; i++) {
    console.log(i, x[i], typeof(x[i]))
}
```

Which of the following statement is correct, if the HTML document is rendered using a browser?
  1. It will display the indices, values and types of all the items of the array.
  2. It will throw error on the console for the very first iteration.
  3. It will display the index, value and type of the value for the first item of arrayand then will throw error for the next value.
  4. None of these.
Q16MCQ2 marks
Which of the following statements is false when using the “async” and “await” keywords in JavaScript?
  1. The “await” keyword can only be used inside an async function.
  2. The “await” keyword pauses the execution of the surrounding async functionuntil the promise resolves.
  3. The async functions always return a promise, even if the return value is not apromise.
  4. The async functions run synchronously, but their await statements executeasynchronously.
Q17MCQ2 marks
question figure
Text of the picture (copyable)
Consider the below JavaScript program.

```javascript
const obj = {
  name: "Abhi",
  greet: function() {
    console.log(this.name);
  }
};

const greet = obj.greet;
greet();
```

What will be the output of the above program?
  1. question figure
    text
    Abhi
  2. question figure
    text
    undefined
  3. question figure
    text
    null
  4. question figure
    text
    Reference Error
  5. question figure
    text
    Garbage Value
Q18MCQ2 marks
question figure
Text of the picture (copyable)
Consider the below JavaScript program.

```javascript
const person = {
  firstName: "John",
  lastName: "Doe",
  fullName: function() {
    return this.firstName + " " + this.lastName;
  }
};

const newPerson = person.fullName.bind({
  firstName: "Jane",
  lastName: "Smith"
});
console.log(newPerson());
```

What will be the output of the above program?
  1. question figure
    text
    John Doe
  2. question figure
    text
    Jane Smith
  3. question figure
    text
    John Smith
  4. question figure
    text
    Jane Doe
  5. question figure
    text
    undefined
  6. question figure
    text
    null
  7. question figure
    text
    Reference Error
Q19MCQ2 marks
Which of the following statements about the beforeDestroy and destroyed lifecycle hooks in Vue is true?
  1. The “beforeDestroy” hook is called after the component is removed from theDOM, and the “destroyed” hook is called before the component is destroyed.
  2. The “beforeDestroy” hook is called before the component is removed from theDOM, and the “destroyed” hook is called after the component is destroyed.
  3. The “beforeDestroy” hook is called when the component is mounted, and the“destroyed” hook is called before the component is destroyed.
  4. Both hooks are called after the component is destroyed.
Q20MCQ2 marks
question figure
Text of the picture (copyable)
Consider the following JavaScript code.

```javascript
function add(x) {
  return function (y) {
    return x + y;
  };
}

const addFive = add(5);
console.log(addFive(10));
```

What will be the output of the code snippet?
  1. 5
  2. 10
  3. 15
  4. 20
Q21MCQ2 marks
Which of the following statements is FALSE?
  1. Cache-Control: no-store prevents caching
  2. ETag helps validate cache freshness
  3. Data stored in sessionStorage remains available even after the browser isclosed and reopened.
  4. localStorage has larger storage limit than cookies
Q22MCQ2 marks
question figure
Text of the picture (copyable)
What will happen if a page includes this CSP header and the script attempts to load an external JavaScript file from otherurl.com?

**CSP Header:**

```
Content-Security-Policy: default-src 'self';
```

**HTML :**

```html
<script src="https://otherurl.com/code.js"></script>
```
  1. question figure
    text
    The script from otherurl1.com will load normally.
  2. question figure
    text
    The script will fail to load, and an error will be logged in the console.
  3. question figure
    text
    The browser will display a warning and allow the script to load.
  4. question figure
    text
    Nothing will happen; the CSP only affects inline scripts.
Q23MCQ4.5 marks
question figure
Text of the picture (copyable)
Consider the below HTML document.

```html
<!DOCTYPE html>
<html>
<body>
  <div>
    <div id="grandparent">GrandParent
      <div id="parent">Parent
        <div id="child"> Child</div>
      </div>
    </div>
  </div>
  <script>
    const grandParent = document.getElementById("grandparent");
    const parent = document.getElementById("parent");
    const child = document.getElementById("child");

    grandParent.addEventListener("click", (e) => {
      console.log("GrandParent");
    }, { capture: true });

    parent.addEventListener("click", (e) => {
      console.log("Parent");
    }, { capture: true });

    child.addEventListener("click", (e) => {
      console.log("Child");
    }, { capture: true });
  </script>
</body>
</html>
```

What will be logged on the console, if the user opens the rendered web page in a browser and clicks the text "Child"?
  1. ChildParent GrandParent
  2. Child
  3. GrandParentParent Child
  4. None of these
Q24MCQ4.5 marks
question figure
Text of the picture (copyable)
Given the following Vuex store setup.

```javascript
const store = new Vuex.Store({
  state: {
    counter: 0
  },
  mutations: {
    increment(state) {
      state.counter++;
    }
  },
  actions: {
    async incrementAsync({
      commit
    }) {
      await new Promise(resolve => setTimeout(resolve, 1000));
      commit('increment');
    }
  }
});
```

Assuming the store is correctly binded with a Vue app, what will be the correct behavior when the following code is executed?

`this.$store.dispatch('incrementAsync');`
  1. The increment mutation will be called immediately after the dispatch.
  2. The state will be updated after the asynchronous operation completes.
  3. The incrementAsync action will be executed synchronously, and increment willbe committed before the promise resolves.
  4. The action will be skipped since mutations cannot be called inside actions.
Q25MCQ4.5 marks
question figure
Text of the picture (copyable)
Consider the following HTML with Vue CDN included?

```html
<div id="app"></div>
<script>
    Vue.component('my-button', {
        template: `
            <button @click="handleClick">
                <slot></slot>
            </button>
        `,
        methods: {
            handleClick() {
                console.log('Button')
                this.$emit('click')
            }
        }
    })

    new Vue({
        el: '#app',
        template: `
            <my-button @click="parentClick">
                Click me
            </my-button>
        `,
        methods: {
            parentClick() {
                console.log('Parent')
            }
        }
    })
</script>
```

What will be logged on the console after the button is pressed?
  1. Parent
  2. Button
  3. ButtonParent
  4. ParentButton
Q26MCQ4.5 marks
question figure
Text of the picture (copyable)
Consider the following HTML with appropriate Vue 2 CDN link attached.

```html
<div id="app"></div>
<script>
  new Vue({
    el: '#app',
    template: `
      <div>
        <p>Likes: {{ displayLikes }}</p>
        <button @click="handleLike">Like</button>
      </div>`,
    data() {
      return {
        post: {
          likes: 5,
          metadata: { lastUpdated: null }
        }
      }
    },
    computed: {
      displayLikes: {
        get() {
          return this.post.likes;
        },
        set(value) {
          this.post.likes = value;
        }
      }
    },
    methods: {
      handleLike() {
        Promise.resolve().then(() => {
          this.displayLikes++;
        });
        this.displayLikes += 1;
        setTimeout(() => {
          this.displayLikes = this.displayLikes + 1;
        }, 0);
      }
    }
  })
</script>
```

What will be rendered in the `<p>` tag after the Like button is pressed once?
  1. Likes: 5
  2. Likes: 8
  3. Likes: 6
  4. Likes: 9
Q27MCQ4.5 marks
question figure
Text of the picture (copyable)
Consider the following HTML, which includes Vue 2 and Vuex CDN links.

```html
<div id="app">
  <p v-if="userData">User: {{ userData.name }}</p>
  <p v-else>No user data available</p>
</div>

<script>
  const store = new Vuex.Store({
    state: {
      userData: null
    },
    mutations: {
      setUserData(state, data) {
        state.userData = data;
      }
    },
    actions: {
      fetchUserData({ commit }) {
        return fetch('https://httpstat.us/500')
          .then(response => {
            if (!response.ok) throw new Error('Network error');
            return response.json();
          })
          .then(data => {
            commit('setUserData', data);
          },
          error => {
            commit('setUserData', { name: 'Luke' })
          })
          .catch(() => {
            commit('setUserData', null);
          });
      }
    }
  });

  new Vue({
    el: '#app',
    store,
    created() {
      this.$store.dispatch('fetchUserData');
    },
    computed: {
      userData() {
        return this.$store.state.userData;
      }
    }
  });
</script>
```

What will be rendered on the browser, if the fetch request gets back 500 status code?
  1. The userData in the store is set to the data from the API.
  2. User: null
  3. The error will be logged, Nothing will be displayed
  4. User: Luke
Q28MCQ4.5 marks
question figure
Text of the picture (copyable)
Consider the following Script embedded in an HTML document.

```javascript
let bsCourses = {
    subject: 'MAD II',
    stream: 'Programming'
}

let esCourses = bsCourses;
let msCourses = {};

for (let course in bsCourses){
    msCourses[key] = bsCourses[key];
}

esCourses.subject = 'Embedded C'
msCourses.stream = 'Electronics'

console.log(msCourses)
```

What will be the output on console, if the HTML document is rendered using a browser?
  1. question figure
    text
    ```
    {
        subject:'MAD II',
        stream:'Programming'
    }
    ```
  2. question figure
    text
    ```
    {
        subject:'Embedded C',
        stream:'Electronics'
    }
    ```
  3. question figure
    text
    ```
    {
        subject:'MAD II',
        stream:'Electronics'
    }
    ```
  4. question figure
    text
    ```
    {
        subject:'Embedded C',
        stream:'Programming'
    }
    ```
Q29MCQ4.5 marks
question figure
Text of the picture (copyable)
Consider the following Script embedded in an HTML document.

```javascript
var var1 = 56;

const exObj = {
    var2: 24,
    var1: 15,
    inObj : {
        var1: 75,
        inObjFunc: ()=>{
            return "Value is " + this.var1;
        }
    },
    exObjFunc: function(){
        let var2 = 14;
        return "Value is " + this.var2;
    }
}

let x = exObj.inObj
console.log(x.inObjFunc())
console.log(exObj.exObjFunc())
```

What will be the output on console, if the HTML document is rendered using a browser?
  1. question figure
    text
    Value is 75
    Value is 24
  2. question figure
    text
    ```
    Value is 56
    Value is 24
    ```
  3. question figure
    text
    Value is 15
    Value is 14
  4. question figure
    text
    ```
    Value is 56
    Value is 14
    ```
Q30MSQ3 marksselect all that apply
question figure
Text of the picture (copyable)
Consider the following Script embedded in an HTML document.

```javascript
let myBox = {
    tool: "Wrench",
    cutter: "Machine Cutter",
    get tools(){
        return `tool: ${this.tool}, cutter: ${this.cutter}`
    },
    set tools(q){
        let box = q.split(' ');
        this.tool = box[0];
        this.cutter = box[1];
    }
}
```

Which of the following statements will throw an error on the console when the HTML document is rendered using a browser?
  1. question figure
    text
    ```javascript
    console.log(myBox.tools)
    ```
  2. question figure
    text
    ```javascript
    console.log(myBox.tools())
    ```
  3. question figure
    text
    ```javascript
    console.log(myBox.tools('ScrewDriver Grinder'))
    ```
  4. question figure
    text
    ```javascript
    console.log(myBox.tools = 'ScrewDriver Grinder')
    ```
Q31MSQ4.5 marksselect all that apply
question figure
Text of the picture (copyable)
Consider the following two HTML documents and the Vue app created in script.js file and select the correct option(s).

index1.html

```html
<body>
    <div id="app">
        <h1 v-if="result">Hello am I visible?</h1>
    </div>
    <script src="./script.js"></script>
</body>
```

index2.html

```html
<body>
    <div id="app">
        <h1 v-show="final">Hello am I visible?</h1>
    </div>
    <script src="./script.js"></script>
</body>
```

script.js

```javascript
var app = new Vue({
    el: '#app',
    data: {
        result: false,
        final: false
    }
})
```
  1. question figure
    text
    When the directive v-if is falsy, it removes the entire element from the DOM.
  2. question figure
    text
    The raw HTML created with index1.html and index2.html will be exactly the same when the values of both "result" and "final" are set to true.
  3. question figure
    text
    The raw HTML created with index1.html and index2.html will be exactly the same
    for the current state of data.
  4. question figure
    text
    When the directive **v-show** is falsy, it removes the entire element from the DOM.
Q32MSQ2 marksselect all that apply
question figure
Text of the picture (copyable)
Consider the below Vue router configuration.

```javascript
const routes = [
  {
    path: '/user/:id',
    component: UserProfile
  }
];

const router = new VueRouter({
  routes
});
```

Which of the following is a valid way to access the "id" parameter inside the UserProfile component?
  1. this.$route.params.id
  2. this.$router.params.id
  3. this.$route.query.id
  4. this.$route.params['id']

Answer key

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

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 core topics, concepts, and principles essential for the exam, along with key equations (where applicable) and Mermaid knowledge graphs to visualize relationships.



Core Topics & Concepts Summary

1. JavaScript Fundamentals

Key Concepts:


Key Equations (JavaScript):

  1. Closure Retention: `` InnerFunction.[[Scope]] = OuterFunction.[[Scope]] + OuterFunction.LocalVars ``
  2. Promise Chaining: `` Promise.resolve(value) .then(x => x + 1) .then(x => Promise.resolve(x + 1)) .catch(e => console.log(e)); ``
  3. Event Loop Priority: `` Sync Code > Microtasks (Promises) > Macrotasks (setTimeout, I/O) ``

2. Vue.js

Key Concepts:


Key Equations (Vue.js):

  1. Reactivity: `` Vue.set(object, key, value) // Forces reactivity for new properties ``
  2. Vuex Flow: `` Action (Async) → Commit Mutation → Update State → Re-render Component ``
  3. Slot Props: `` <slot name="slotName" :propName="data"></slot> <template v-slot:slotName="{ propName }">{{ propName }}</template> ``

3. Web APIs & Security

Key Concepts:


Key Equations (Web APIs):

  1. Cookie Security: `` Set-Cookie: name=value; Secure; HttpOnly; SameSite=Strict ``
  2. CSP Rule: `` default-src 'self' → Blocks all external resources. ``

4. DOM & Event Handling

Key Concepts:


Key Equations (DOM):

  1. Event Flow: `` Capturing Phase → Target Phase → Bubbling Phase ``
  2. Event Delegation: `` ParentListener → e.target → Child Element ``

5. Modern JavaScript Patterns

Key Concepts:


2. Vue.js Ecosystem

3. Web Security

4. Asynchronous JavaScript

5. Vuex Data Flow


Exam Preparation Checklist

TopicKey Points to Review
ClosuresScope retention, data encapsulation.
this in JSArrow vs. regular functions, bind/call.
Event LoopMicrotasks vs. macrotasks, setTimeout vs. Promise.
Vue Reactivitydata(), computed properties, watchers.
VuexMutations (sync) vs. actions (async).
SlotsDefault, named, scoped slots.
DOM EventsCapturing/bubbling, event delegation.
Web SecurityCSP, SQL injection, CSRF, cookie attributes.
Async PatternsPromises, async/await, error handling.
Vue RouterDynamic routes, route params.

Focus Areas for Equations:

  1. Event Loop Priority: Sync > Microtasks > Macrotasks.
  2. Vuex Flow: Action → Mutation → State → Component.
  3. CSP Rules: default-src 'self' blocks external resources.
  4. Cookie Security: Secure; HttpOnly; SameSite=Strict.