This repository has been archived on 2021-09-06. You can view files and clone it, but cannot push or open issues or pull requests.
vuejs_course/2021-01-18 basics-01-starti.../app.js

24 lines
546 B
JavaScript

"use strict";
const app = Vue.createApp({
data() {
return {
courseGoalA: "Finish the course and learn Vue!",
courseGoalB: "Master Vue and build amazing apps!",
vueLink: "https://vuejs.org",
};
},
methods: {
outputGoal() {
const randomNumber = Math.random();
if (randomNumber < 0.5) {
return this.courseGoalA;
} else {
return this.courseGoalB;
}
},
},
});
app.mount("#user-goal");