这段代码有什么问题? [英] What's the problem with this code?
本文介绍了这段代码有什么问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
var Rainbow = function(rainbow.x, rainbow.y, rainbow.radius) {
this.x = rainbow.x;
this.y = rainbow.y;
this.radius = rainbow.radius;
}
我的尝试:
我试过一切,但无济于事。 :(
What I have tried:
I've tried EVERYTHING, but to no avail. :(
推荐答案
Javascript变量名称不能包含句点。
Javascript variable names cannot contain periods.
var Rainbow = function(x, y, radius) {
this.x = x;
this.y = y;
this.radius = radius;
};
这篇关于这段代码有什么问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文