0
[SOLVED]How do I prompt the Mars object within the Rover class? For, is returning me the following error: "Mars is not defined"
class Rover{
  constructor(orderedX,orderedY,orientation,toMove){
    this.orderedX = orderedX;
    this.orderedY = orderedY;
    this.orientation = orientation;
    this.toMove = toMove;
    this.marsZise = new Mars(5,5);
    this.running();
  }
class Mars{
  constructor(sizeX,sizeY){
    this._orderedlengthX = sizeX;
    this._orderedlengthY = sizeY;
  }
Please redirect your Question for stackoverflow. Thanks :)
– Jorge.M
you’re using
typescript? if yes, just do:Rover extends Mars– Jorge.M