Click here to Skip to main content
15,907,326 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
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. :(
Posted
Updated 26-Jun-17 7:03am

1 solution

Javascript variable names cannot contain periods.
var Rainbow = function(x, y, radius) {
    this.x = x;
    this.y = y;
    this.radius = radius;
};
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900