Back to Object Builder
OOP Studio Ages 9-15

Object Challenge

Create your own class, make at least two objects, and call one method on each object.

10-15 min Ages 9-15 OOP Challenge JavaScript
Code Editor

Create your own blueprint.

Example code
class PowerUp {
  constructor(name, points) {
    this.name = name;
    this.points = points;
  }

  activate() {
    say(this.name + " gives " + this.points + " points");
  }
}

let star = new PowerUp("Star", 10);
let shield = new PowerUp("Shield", 5);

star.activate();
shield.activate();
Output

Program result

Robot ready to speak your strings

Type real JavaScript, then run it.