math-q-factory
Version:
node module that return maths questions
14 lines (11 loc) • 449 B
JavaScript
const { numberTheorySectionList } = require('./numberTheorySectionList');
const defaultQ = { q: 'default number Theory Q', a: 42 }
const numberTheoryQs = (section = '', qName = '') => {
if (numberTheorySectionList[section] === undefined) { return defaultQ }
let question = numberTheorySectionList[section].qGetter(qName);
return question
}
module.exports = {
chapterName: 'numberTheory',
qGetter: numberTheoryQs
}