function tensDigit(name) {
let tensDigit = parseInt((num % 100) / 10); // 十位数
return tensDigit;
}
function generateQuestion(numbers) {
let result = 0;
........省略
for (let i = 0; i < bishu; i++) {//几笔
let number, operator;
let validNumber = false;
let result_onesDigit=onesDigit(result);
if(result>10)
{
let result_tensDigit=tensDigit(result);//运行到这就不动了,去掉这一行就可以往下运行;
alert(result_tensDigit);
}
........省略
result += operator === '+' ? number : -number;
question += (i > 0 ? ' ' : '') + operator + number;
}
}
let result_tensDigit=tensDigit(result);//运行到这就不动了,去掉这一行就可以往下运行;