25 lines
557 B
Vue
25 lines
557 B
Vue
|
<template>
|
||
|
<div>
|
||
|
<p>Ihre Wahrscheinlichkeit sich zu infizieren ist</p>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
name: "Results",
|
||
|
mounted() {
|
||
|
const biased = this.$store.state.answers.map((x, i) => {
|
||
|
return x * this.$store.state.questions[i].multiplicator
|
||
|
})
|
||
|
const summed = biased.reduce(function(acc, current) {
|
||
|
return acc + current
|
||
|
})
|
||
|
console.log(Math.round(summed / 10))
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style scoped>
|
||
|
|
||
|
</style>
|