Vue.js Multiple Choice Questions


Vue.js MCQ

1) Which of the following statement best define Vue.js?
Vue.js is an open-source JavaScript library that is used for developing user interfaces.
Vue.js is an open-source front-end JavaScript framework used for developing user interfaces.
Vue.js is an open-source, cross-platform, JavaScript run-time situation that performs the JavaScript program outside a web browser.
Vue.js is a JavaScript library constructed to facilitate HTML DOM tree traversal and administration, event handling, CSS activity, and Ajax. 



Answer: B is the correct option. Vue.js is an open-source front-end JavaScript framework used for developing user interfaces.

2) Why is Vue.js called a progressive framework?
Vue.js is called a progressive framework because it is being changed and developed continually.
Vue.js is called a progressive framework because it facilitates us to create Dynamic User Interfaces and single-page applications.
Vue.js is called a progressive framework because it follows the latest JavaScript standards.
All of the above. 



Answer: A is the correct option. Vue.js is called a progressive framework because it is being changed and developed continually.

3) What is the main usage of Vue.js?
Vue.js is a dynamic JavaScript framework that is frequently used for developing user interfaces.
Vue.js is a JavaScript library that makes user interfaces for single-page applications by dividing UI into components.
Vue.js uses the MVVM pattern to bind data to certain DOM elements.
All of the above. 



Answer: A is the correct option. Vue.js is a dynamic JavaScript framework that is frequently used for developing user interfaces.

4) Which company invented Vue.js?
Facebook
Google
Oracle
Twitter 



Answer: B is the correct option. Evan You is the founder/inventor of Vue.js. He was working at Google on several Angular projects when he founded Vue.js.

5) Which of the following data binding interpolation is also known as "Mustache" syntax?
v-on
v-model
{{}}
[] 



Answer: C is the correct option. The {{}} data binding interpolation is also known as "Mustache" syntax.

6) Which of the following is the correct way to install Vue.js in your project?
We can install Vue.js by using CDN by including <script> tag in HTML file.
We can install Vue.js by using Node Package Manager (NPM).
You can install Vue.js using Bower.
All of the above. 



Answer: D is the correct option. All of the above are the correct ways to install Vue.js in your project.

7) Which of the following is the correct syntax to use for loop in Vue.js?
vFor
v-for
*v-for
None of the above. 



Answer: B is the correct option. The "v-for" is the correct syntax to use for loop in Vue.js.

8) Which of the following syntax is correct for creating a Vue.js instance?
var text = new object ({//options})
var text = new class ({//options})
var text = new text ({//options})
var text = new Vue({// options }) 



Answer: D is the correct option. The correct syntax for creating instance is var text = new Vue({// options }).

9) Which of the following is the advantage of using Vue.js?
Vue.js is very small in size.
The documentation of Vue.js is very easy and comprehensive.
Vue.js is flexible in nature.
All of the above. 



Answer: D is the correct option. All of the above are the advantages of using vue.js.

10) Which of the following modifier is very useful for improving the performance of mobile devices?
.directive
.once
.capture
.passive 



Answer: D is the correct option. The ".passive" modifier is very useful for improving the performance of mobile devices.

11) Which of the following directive is used for two-way binding in Vue.js?
v-on
v-model
no-one
v-bind 



Answer: B is the correct option. The v-model directive is used for two-way binding in Vue.js.

12) Which of the following directive is used for one-way data binding in Vue.js?
v-on
v-model
no-one
v-bind 



Answer: D is the correct option. The v-bind directive is used for one-way data binding in Vue.js.

13) Which of the following statement is correct for components props in Vue.js?
Props are used to pass down data to the child components.
Props are custom attributes that you can register on a component.
When a value is passed to a prop attribute, it becomes a property on that component instance.
All of the above. 



Answer: D is the correct option. All of the above statements are correct for components props in Vue.js.

14) How many ways are there to define a filter in Vue.js?
1
2
3



Answer: B is the correct option. There are two ways to define a filter in Vue.js

15) Which of the following is a core feature of Mixins in Vue.js?
Mixins provide great flexibility.
Mixin contains options for Vue.js components. You can use Mixins in Vue.js safely because they do not affect changes outside their defined scope.
Mixins in Vue.js provide a great platform for code reusability.
All of the above. 



Answer: D is the correct option. All of the above are the features of Vue.js.

16) Which of the following is the correct full form of MVVM?
Model-Value-Value Model
Model-View-Value Model
Model-View-View Model
Module-View-View Model 



Answer: C is the correct option. The correct full form of MVVM is Model-View-View Model.

17) What is VueX?
VueX is a state management pattern and library for the Vue.js application.
VueX is a command used in Vue.js.
VueX is a component of Vue.js.
None of the above. 



Answer: A is the correct option. VueX is a state management pattern and library for the Vue.js application.

18) Which of the following method does not represent the non-mutation?
Reverse() Method
Concat() Method
Slice() Method
Filter() Method 



Answer: A is the correct option. The Reverse() method does not represent the non-mutation.

19) What is the main usage of filters in Vue.js?
Filters are used to enhance the presentation of the view layer.
Filters are also reusable, and you can declare a filter globally and use it on any desirable component.
Filters facilitate you to format your data at the view level.
All of the above. 



Answer: D is the correct option. All of the above is the usage of filters in Vue.js.

20) Which of the following keyword is used to create constant in Vue.js?
Const
Constant
Define
None of the above 



Answer: A is the correct option. The const keyword is used to create a constant in Vue.js.

21) The Following code represents the registered component. How can you call the custom component in my template?

Vue.component('my-component', {
template: 'my own component!'
})
new Vue({
el: '#demo'
}) Vue.component('my-component', { template: 'my own component!' }) new Vue({ el: '#demo' })
v-bind:my-component
<my-component></my-component>
v-my-component
@my-component 



Answer: B is the correct option.

22) How many types of directives are available in Vue.js?
2
3
4



Answer: C is the correct option. There are four types of directives available in Vue.js.

23) Which of the following is the correct syntax to install Vue.js plug-in?
install = function (Vue, options[]) {}
install = function (Vue, options) {}
install = function () {}
None of the above. 



Answer: B is the correct option.

24) Which of the following event modifier should we use to perform the click event only for the one time?
<a @:click.passive="dotask"></a>
<a @:click.once="dotask"></a>
<a @:click.prevent-once="dotask"></a>
<a @:click.prevent-once="dotask"></a> 



Answer: B is the correct option.


Comments

Popular posts from this blog

Mini-Max Algorithm in Artificial Intelligence

Alpha-Beta Pruning

SQL Multiple Choice Questions