CHALLENGE 1: SOLUTION

Solution of the previous problem :-

  • so, the first part of calculator is sum of addition ,as you can see in the image below that the num1 and num2 are initially zero and we created relationship using v-model directive with both, and outputted addition of numbers inputted by user in num1 and num2 by writing {{num1+num2}} in code.

    ../../_images/210.png
  • now, the other part, we have taken name as an empty string and established relationship using v-model=”name” and added many option like here we have added variety of tacos names .So, when you select any option text will appear accordingly.this text will appear according to condition we created using v-if=”name” (whatever name of tacos you will select from the options)then the text “my favourite kind of taco is {{name}}””,ie. here in place of name the option you have will be outputted on the screen with text.

    ../../_images/110.png