linkedin Skip to Main Content
Just announced! We now support spreadsheets
Back to blog

Code Challenge: Vue Counter App

Coding Challenges

Vue is a popular JavaScript library for building frontend applications and user interfaces. It builds on HTML, CSS and JavaScript and employs a declarative model for building components. You can try out Vue on the Vue CoderPad sandbox to have a feel of the library.

For this code challenge, you have two tasks to perform on this Vue application:

  • Implement the feature for increasing and decreasing the count by 1.
  • Implement the feature for persisting the count value in the browser’s local storage so that when the page is reloaded, the value of the count remains the same as before the reload.

Please see the instructions written directly in the pad to proceed:

💡 Remember to share your solution with the hashtag #CoderpadTinyInterviews on Twitter and LinkedIn.

Want some more challenge?

If you completed the original goal, why not try the following bonus exercise?

  • Implement checks that prevents the counter value from being negative.
  • Allow the counter value to be increased or decreased by custom values.

Code challenge solution

Verify your solution with the official solution in this sandbox.

More resources

We have made available an extra resource to improve your Vue coding skills:

Want to conduct interviews on this platform?

Check out CoderPad : pick any interview question or create your own, then invite your candidate to a shared live-coding session on an IDE like this one. You even get 2 free interviews per month forever using this registration link!