vue, react Flashcards

1
Q

What is Vue.js primarily used for? a) Back-end development b) Front-end development c) Database management d) Mobile development

A

b) Front-end development

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

Who created Vue.js? a) Evan You b) Ryan Dahl c) Dan Abramov d) Jordan Walke

A

a) Evan You

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

What year was Vue.js first released? a) 2010 b) 2013 c) 2014 d) 2016

A

c) 2014

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

Which programming language does Vue.js use? a) JavaScript b) Ruby c) Python d) C++

A

a) JavaScript

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

What type of framework is Vue.js? a) Full-stack framework b) Front-end framework c) Back-end framework d) Mobile framework

A

b) Front-end framework

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

What does MVVM stand for in Vue.js architecture? a) Model-View-ViewModel b) Model-View-Model c) Management-View-Model d) Model-Value-ViewModel

A

a) Model-View-ViewModel

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

Which directive is used for conditional rendering in Vue.js? a) v-bind b) v-if c) v-for d) v-show

A

b) v-if

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

What does the v-for directive in Vue.js do? a) It binds data to an attribute b) It loops through an array or object c) It conditionally renders elements d) It attaches an event listener

A

b) It loops through an array or object

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

What is the purpose of v-bind in Vue.js? a) Loop through data b) Bind an attribute to a property c) Conditionally render an element d) Add an event listener

A

b) Bind an attribute to a property

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

Which testing framework is officially recommended for unit testing in Vue.js? a) Jest b) Mocha c) Vitest d) Jasmine

A

c) Vitest

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

What command is used to create a new Vue.js project? a) npm create vue@latest b) vue init c) npm vue create d) vue-cli

A

a) npm create vue@latest

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

Which of the following is NOT a feature of Vue.js? a) Reactive data binding b) Component-based architecture c) Virtual DOM d) Multi-threading

A

d) Multi-threading

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

What does Vue.js primarily rely on for its templating? a) JSX b) JavaScript functions c) Templates with special directives d) TypeScript

A

c) Templates with special directives

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

What is the main difference between Angular and React? a) Angular is a framework; React is a library b) React is a framework; Angular is a library c) They are the same d) Both are not used for web development

A

a) Angular is a framework; React is a library

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

Which of the following is a feature of React but not Vue.js? a) JSX b) Virtual DOM c) Two-way data binding d) Component-based architecture

A

a) JSX

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

Which programming paradigm does Vue.js follow? a) Functional programming b) Object-oriented programming c) Reactive programming d) Procedural programming

A

c) Reactive programming

17
Q

Which of the following is used for handling HTTP requests in Vue.js? a) Axios b) Fetch API c) XMLHttpRequest d) All of the above

A

d) All of the above

18
Q

Which Vue.js feature allows developers to manage state across multiple components? a) Vuex b) Pinia c) Redux d) Context API

19
Q

What type of testing does Cypress perform? a) Unit testing b) Integration testing c) End-to-end testing d) All of the above

A

c) End-to-end testing

20
Q

What is the purpose of the event loop in JavaScript? a) Execute asynchronous code b) Manage synchronous code c) Handle DOM manipulation d) Execute synchronous and asynchronous code together

A

a) Execute asynchronous code

21
Q

Which of the following uses the Incremental DOM for rendering? a) React b) Vue.js c) Angular d) Svelte

A

c) Angular

22
Q

What type of DOM does React use? a) Virtual DOM b) Incremental DOM c) Real DOM d) Hybrid DOM

A

a) Virtual DOM

23
Q

Which of the following frameworks uses Virtual DOM? a) Vue.js b) React c) Angular d) Both a and b

A

d) Both a and b

24
Q

What is the primary advantage of using a Virtual DOM? a) It speeds up rendering by minimizing direct DOM manipulations b) It increases memory usage c) It is easier to manage than Incremental DOM d) It reduces the complexity of the code

A

a) It speeds up rendering by minimizing direct DOM manipulations

25
Q

Which of the following is true about the use of TypeScript in Vue.js? a) It is mandatory b) It is an optional feature c) It is only available in Vue 2.x d) It is used for server-side programming

A

b) It is an optional feature

26
Q

Which of the following statements is correct about Vue.js and React? a) Vue is a framework, React is a library b) Vue is a library, React is a framework c) Both are frameworks d) Both are libraries

A

a) Vue is a framework, React is a library

27
Q

Which of the following frameworks is designed primarily for mobile development? a) Angular b) React Native c) Vue Native d) All of the above

A

b) React Native

28
Q

What type of framework is Vue.js compared to React? a) Full-stack framework b) Backend framework c) Front-end framework d) Mobile framework

A

c) Front-end framework

29
Q

Which of the following features are supported out of the box in Vue.js? a) Two-way data binding b) State management c) Component lifecycle hooks d) All of the above

A

d) All of the above

30
Q

What is Vue CLI used for? a) To generate a Vue.js project b) To manage application dependencies c) To deploy a Vue.js application d) All of the above

A

d) All of the above

31
Q

Which directive in Vue.js is used to loop through an array of items? a) v-bind b) v-model c) v-for d) v-if

32
Q

Which feature does Angular have that Vue.js doesn’t? a) Directives b) Two-way data binding c) Dependency Injection d) Virtual DOM

A

c) Dependency Injection

33
Q

Which of the following frameworks is best for building Progressive Web Apps (PWAs)? a) Angular b) React c) Vue.js d) All of the above

A

d) All of the above

34
Q

What is Vue Router used for in Vue.js? a) Manage the URL and page state b) Handle form validation c) Handle state management d) Handle user input events

A

a) Manage the URL and page state

35
Q

Which of the following is used to validate forms in Vue.js? a) Custom validation b) VeeValidate c) Pinia d) Axios

A

b) VeeValidate

36
Q

Which of the following is used to bind data in a Vue.js template? a) v-bind b) v-model c) v-for d) v-if

A

b) v-model

37
Q

What does mounted() lifecycle hook do in Vue.js? a) It is called before the component is created b) It is called when the component is rendered c) It is called when the component is updated d) It is called when the component is destroyed

A

b) It is called when the component is rendered

38
Q

What is the command to run the Vue development server? a) npm run serve b) npm run start c) npm run dev d) npm run build

A

c) npm run dev

39
Q

Which library is commonly used for state management in Vue.js? a) Redux b) Vuex c) Context API d) NgRx