should be
class Bubble { //On this line, a Syntax error appears: “Expected an operand, but found class”
Bubble(){
this.x = random(width);
}
}
A constructor is a special mmethod with the same name as the class and no return type
To make your code look like code hichlight it and click on </> button. Go back and edit your post to try it ![]()