Skip to content

Instantly share code, notes, and snippets.

@Xevion
Created December 19, 2020 02:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Xevion/5d148d79855d3d321c9db587226c2219 to your computer and use it in GitHub Desktop.
Save Xevion/5d148d79855d3d321c9db587226c2219 to your computer and use it in GitHub Desktop.
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