0

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();
4

1 回答 1

2

您需要};从第 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();
于 2018-01-07T22:27:29.120 回答