All Vue.js quizzes
Beginner30 questions45 minutes

Vue.js Beginner Quiz

Master Vue basics including templates, directives, data binding, and component basics

Start the quiz

Sample questions from this quiz

A preview of the style and depth. Try each one, then reveal the answer — or skip straight to the timed quiz.

1. What is the correct way to create a Vue instance?

const app = Vue.createApp({})
  • Use Vue.init()
  • This is correct for Vue 3
  • Use createVue()
  • Use new Vue()
Show answer

Answer: This is correct for Vue 3. Vue 3 uses createApp() to create application instances. Vue 2 used new Vue(). The new API allows multiple app instances.

2. What directive is used for two-way data binding?

  • v-data
  • v-model
  • v-sync
  • v-bind
Show answer

Answer: v-model. v-model creates two-way data binding on form inputs. It automatically syncs input values with component data.

3. How do you bind an attribute in Vue?

<img v-bind:src="imageUrl">
  • Use :src only
  • Both a and c
  • Use bind:src
  • This is correct
Show answer

Answer: Both a and c. v-bind:attribute binds data to attributes. The shorthand is :attribute. Both syntaxes are valid.

Frequently asked questions

How many questions are in this Vue.js quiz?+

30 questions, with a 45-minute time limit. Every question includes a written explanation of the correct answer.

Is this Vue.js quiz free?+

Yes. Every quiz on CodexQuizz is free and needs no account. You only enter a name if you choose to post your score to the leaderboard.

What level is the beginner quiz aimed at?+

Master Vue basics including templates, directives, data binding, and component basics

Can I use this to prepare for a Vue.js interview?+

Yes. The questions cover the topics that come up in Vue.js technical screens, and the explanations are written so that a wrong answer still teaches you the underlying concept.

Ready to test your Vue.js?

30 questions, 45 minutes. Free, no sign-up.

Start now