Skip to content

Instantly share code, notes, and snippets.

@Xevion

Xevion/problems.js

Created Dec 19, 2020
Embed
What would you like to do?
import arithmetic from "@/arithmetic";
import utils from "@/utils";
export default {
methods: {
getProblem() {
console.log(this);
let problem = this.problems[utils.methods.getRandomInt(0, this.problems.length)];
return problem.method(problem.difficulties[problem.current])();
}
},
data: () => {
return arithmetic.data().problems
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment