Vue JS Event Handling Vue JS Question #7684
Single Choice Easy

QHow to initialize the root instance in Vue JS (using the CDN method)?

ID: #7684 Event Handling Vue JS 155 views
Question Info
#7684Q ID
EasyDifficulty
Event Handling Vue JSTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A var app = Vue({...});
  • B var app = Vue.new({...});
  • C var app = Vue new({...});
  • D var app = new Vue({...});
Correct Answer

Explanation

The correct way to initialize the root instance in Vue JS using the CDN method is:

var app = new Vue({...});

Explanation:

In Vue.js, we create a new Vue instance by calling the Vue constructor function. The new keyword is used to create a new instance of the Vue class.

In the given options, the correct syntax for creating a new instance of the Vue class is new Vue({...}). Therefore, the correct way to initialize the root instance in Vue JS using the CDN method is var app = new Vue({...});.

No Previous Next Question

Share This Question

Challenge a friend or share with your study group.