WEBTECH QUIZES\ Flashcards

1
Q

What is the difference between v-show and v-if directives?

A

v-show renders an element to the DOM and then uses the CSS display property to show/hide elements based on expression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the difference between computed properties and methods?

A

Computed properties will cache the result

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which of the following is NOT a vue life cycle state?

A

afterCreated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Assume items is an array defined in the data option of a Vue instance, in Vue 2, which of the following operations on this array cannot be detected by Vue?

A

items[2] = newValue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which of the following has error?

A

<img></img>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In Vue 3, which of the following is not an option (properties we used in Vue’s constructor) used to create a Vue instance?

A

el

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which part of the code corresponds to the first “V” in MVVM?

A

HTMLs in div with id=”app”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which directive provides two-way data binding?

A

v-model

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How does Vue.js change the CSS class of a div?

A

Using v-bind

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Think about Vue’s life cycle, when does Vue get ready (In other words, Vue becomes reactive and can help you bind data to html

A

mounted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which of the following is NOT an option in a Vue component?

A

slots

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How to register component A inside another one, say component B?

A

Using component B’s option “components

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How does a parent component pass data to its child component?

A

using props defined in the child component

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a slot in Vue.js?

A

It is used to pass content from parent to child component

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

When do you need to use named slots?

A

When a child component needs to receive multple contents from its parent component

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is Element Plus?

A

It is a free Vue 3.0 component library

17
Q

If a child component emits an event called “item-changed”, what is the syntax for its parent to capture this event?

A

@item-changed

18
Q

How many Spring projects are there as of March 2023?

A

21

19
Q

How do you inject a dependency bean to a dependent bean in Spring?

A

Using constructor argument

20
Q

Which one of the following statements is correct?

A

Spring Boot is an extension of Spring framework.

21
Q

Which of the following about Maven is correct?

A

A popular Java build tool

22
Q

Which of the following HTTP method should be used to fetch resource using RESTful web service?

A

GET

23
Q

Which of the following is NOT a REST constraint?

A

responsive

24
Q

Which of the following is a REST API endpoint?

A

/students/178965285

25
Q

Which of the following is NOT correct

A

One web application needs only one unit test

26
Q
A