为什么这会显示无效的语法?

时间:2018-03-04 02:40:28

标签: python python-3.x

there is an error where there shouldn't be

下面代码的第一行有一个语法错误,当我删除冒号时,第二行会出现语法错误。 (完整代码在上图中。)

我不明白为什么。

function Thing(x, y) {
    this.x = x;
    this.y = y;
}
function Square(x,  y, size) {
    var self = new Thing(x, y);
    self.size = size;
    return self;
}

1 个答案:

答案 0 :(得分:1)

看看它正上方的一行,你错过了一个右括号:

enter image description here

相关问题