vue, react Flashcards
What is Vue.js primarily used for? a) Back-end development b) Front-end development c) Database management d) Mobile development
b) Front-end development
Who created Vue.js? a) Evan You b) Ryan Dahl c) Dan Abramov d) Jordan Walke
a) Evan You
What year was Vue.js first released? a) 2010 b) 2013 c) 2014 d) 2016
c) 2014
Which programming language does Vue.js use? a) JavaScript b) Ruby c) Python d) C++
a) JavaScript
What type of framework is Vue.js? a) Full-stack framework b) Front-end framework c) Back-end framework d) Mobile framework
b) Front-end framework
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) Model-View-ViewModel
Which directive is used for conditional rendering in Vue.js? a) v-bind b) v-if c) v-for d) v-show
b) v-if
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
b) It loops through an array or object
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
b) Bind an attribute to a property
Which testing framework is officially recommended for unit testing in Vue.js? a) Jest b) Mocha c) Vitest d) Jasmine
c) Vitest
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) npm create vue@latest
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
d) Multi-threading
What does Vue.js primarily rely on for its templating? a) JSX b) JavaScript functions c) Templates with special directives d) TypeScript
c) Templates with special directives
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) Angular is a framework; React is a library
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) JSX
Which programming paradigm does Vue.js follow? a) Functional programming b) Object-oriented programming c) Reactive programming d) Procedural programming
c) Reactive programming
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
d) All of the above
Which Vue.js feature allows developers to manage state across multiple components? a) Vuex b) Pinia c) Redux d) Context API
a) Vuex
What type of testing does Cypress perform? a) Unit testing b) Integration testing c) End-to-end testing d) All of the above
c) End-to-end testing
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) Execute asynchronous code
Which of the following uses the Incremental DOM for rendering? a) React b) Vue.js c) Angular d) Svelte
c) Angular
What type of DOM does React use? a) Virtual DOM b) Incremental DOM c) Real DOM d) Hybrid DOM
a) Virtual DOM
Which of the following frameworks uses Virtual DOM? a) Vue.js b) React c) Angular d) Both a and b
d) Both a and b
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) It speeds up rendering by minimizing direct DOM manipulations
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
b) It is an optional feature
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) Vue is a framework, React is a library
Which of the following frameworks is designed primarily for mobile development? a) Angular b) React Native c) Vue Native d) All of the above
b) React Native
What type of framework is Vue.js compared to React? a) Full-stack framework b) Backend framework c) Front-end framework d) Mobile framework
c) Front-end framework
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
d) All of the above
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
d) All of the above
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
c) v-for
Which feature does Angular have that Vue.js doesn’t? a) Directives b) Two-way data binding c) Dependency Injection d) Virtual DOM
c) Dependency Injection
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
d) All of the above
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) Manage the URL and page state
Which of the following is used to validate forms in Vue.js? a) Custom validation b) VeeValidate c) Pinia d) Axios
b) VeeValidate
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
b) v-model
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
b) It is called when the component is rendered
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
c) npm run dev
Which library is commonly used for state management in Vue.js? a) Redux b) Vuex c) Context API d) NgRx
b) Vuex