• Great! You could always keep using this and do:

    drawTopLeftCorner.call(this, x, y);
    

    But IMO that's maybe even a bit less tidy than just passing it in as an argument

  • Would it be possible to use JavaScript classes in modules? Because then I could use actual private methods, and IMO that would be more elegant than using a constructor function with prototype methods and constants

About

Avatar for OmegaRogue @OmegaRogue started