javascript调试器在第3行上说大括号是意外令牌。
谁能帮我这个忙吗?
setTimeout(rollDice, (multiplier * bconfig.wait) + Math.round(Math.random()
* 1000));
};
toggleHiLo = function() {
if (hilo === 'hi') {
hilo = 'hi';
} else {
hilo = 'hi';
}
};
var num = parseFloat($('#balance').html());
bconfig.startbal = num;
bconfig.want = num ;
bconfig.autoexit = num - 10000;
rollDice();
最佳答案
您需要从第三行中删除};
,因为您根本不需要它。
码:
setTimeout(rollDice, (multiplier * bconfig.wait) + Math.round(Math.random() * 1000));
toggleHiLo = function() {
if (hilo === 'hi') {
hilo = 'hi';
} else {
hilo = 'hi';
}
};
var num = parseFloat($('#balance').html());
bconfig.startbal = num;
bconfig.want = num ;
bconfig.autoexit = num - 10000;
rollDice();