This set of Multiple Choice Questions & Answers (MCQs) focuses on “Vue JS”.
1. What is Vue JS?
a) Programming Language
b) Directives
c) Scripting Language
d) A framework
View Answer
Explanation: Vue.js is an open-source front-end JavaScript framework for building user interfaces and single-page applications.
2. Which of the following is the correct definition of Vue JS?
a) Vue.js is a JavaScript library that makes traversing and administering the HTML DOM tree, event handling, CSS activity, and Ajax easier
b) Vue.js is an open-source JavaScript front-end framework for creating user interfaces
c) Vue.js is a JavaScript library for creating user interfaces that are open-source
d) Vue.js is a cross-platform, open-source JavaScript run-time environment that executes JavaScript code outside of a web browser
View Answer
Explanation: Vue.js is an open-source JavaScript front-end framework for creating user interfaces.
3. Vue.JS was created by which of the following companies?
a) Facebook
b) Google
c) Microsoft
d) Samsung
View Answer
Explanation: Vue was created by Evan You after working for Google using AngularJS in a various projects.
4. Which of the following is the full-form of MVVM?
a) Model-View-Value Model
b) Module-Value-View Model
c) Model-View-View Model
d) Model-View-View Module
View Answer
Explanation: The MVVM design allows for the development of the graphical user interface to be separated from the rest of the application using mark-up language or GUI code. Model–View–ViewModel is the full form of MVVM.
5. Which of the following method does not represent the non-mutation?
a) Concat() Method
b) Reverse() Method
c) Splice() Method
d) None of the mentioned
View Answer
Explanation: The Reverse() method does not represent the non-mutation.
6. Which of the following method is an array detection mutation method?
a) Concat() Method
b) Reverse() Method
c) new() Method
d) None of the mentioned
View Answer
Explanation: As the name suggests, mutation methods modifies the original array. The array mutation methods which trigger view updates are push(), pop(), shift(), unshift(), splice(), sort(), reverse()
7. Which of the following syntax is correct for creating a Vue.js instance?
a) var text = new instance ({//options})
b) var text = new object ({//options})
c) var text = new class ({//options})
d) var text = new Vue({// options })
View Answer
Explanation: Whenever a new Vue project is created, the Vue instance gets activated by default in the main.js file. Syntax:
var vm = new Vue({
// options
})
8. Which keyword is used to create a constant in Vue.JS?
a) constant
b) int
c) const
d) define
View Answer
Explanation: To create constant const keyword is used. The best practice is to create a seperate file for defining consants.
9. Which of the following data binding interpolation is known as “Mustache” syntax?
a) v-model
b) [[]]
c) {{}}
d) v-on
View Answer
Explanation: The mustache syntax, which uses double curly braces, is the most basic variant. This would result in a one-way data connection between the model and the template. In the template, the raw value is displayed.
10. What happens when a View Model is destroyed?
a) doesn’t affect even listeners
b) all event listeners are should be manually removed
c) all event listeners are automatically removed
d) none of the mentioned
View Answer
Explanation: A ViewModel code can be of pure logic and DOM-free because you don’t have to manually attach event listeners in JS. This makes testing a lot easier. All event listeners are automatically removed when a ViewModel is destroyed.
Sanfoundry Global Education & Learning Series – Javascript Programming.
- Practice MCA MCQs
- Check JavaScript Books
- Practice Programming MCQs
- Practice Information Science MCQs
- Apply for Computer Science Internship