avatarMateusz Rybczonek

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

587

Abstract

orm with two inputs. First input represents a name of the vessel and second one a unique MMSI number. The requirement is that the MMSI must be always be a number.</p><p id="80c6">You bound the value using <code>v-model</code> and added <code>type="number"</code> attribute to be sure that the value is a number.</p><p id="f849">But when you fill the form you still see that the MMSI is saved as a <code>string</code>.</p><p id="4b2f">Go through the code and find what needs to be changed to fix that.</p><h1 id="60cc">Challenge</h1><p id="695f"><a href="https://codesandbox.io/s/vue-js-in

Options

terview-challenge-15-number-input-bgn6b?file=/src/App.vue">CodeSandbox</a></p><p id="a91e">Take a close look and understand the problem first. Try to solve it on your own. If you get stuck, you can always refer to the solution provided. Good luck!</p><p id="7d87"><a href="https://medium.com/@m.rybczonek/vue-js-interview-challenge-15-number-input-solution-dc7f053597b2">Solution</a></p><p id="8970">Want to see more challenges? Support my writing by joining Medium — <a href="https://medium.com/@m.rybczonek/membership">https://medium.com/@m.rybczonek/membership</a></p></article></body>

Vue.js Interview Challenge — #15 — Number Input

Photo by Tony Hand on Unsplash

Problem statement

In this challenge you have a simple form with two inputs. First input represents a name of the vessel and second one a unique MMSI number. The requirement is that the MMSI must be always be a number.

You bound the value using v-model and added type="number" attribute to be sure that the value is a number.

But when you fill the form you still see that the MMSI is saved as a string.

Go through the code and find what needs to be changed to fix that.

Challenge

CodeSandbox

Take a close look and understand the problem first. Try to solve it on your own. If you get stuck, you can always refer to the solution provided. Good luck!

Solution

Want to see more challenges? Support my writing by joining Medium — https://medium.com/@m.rybczonek/membership

Vuejs
Vue
Front End Development
Interview
Interview Questions
Recommended from ReadMedium