Facebook
From Thijs E, 5 Years ago, written in JavaScript.
This paste is a reply to Class prototype JS from Thijs E - view diff
Embed
Download Paste or View Raw
Hits: 402
  1. class myClass{
  2.  
  3.         constructor(var1, var2, var3){
  4.                 this.var1
  5.                 this.var2
  6.                 this.var3
  7.         }
  8.  
  9.  
  10.         myMethod() {
  11.         fill(255, 255, 255);
  12.         ellipse(this.var1, this.var2, this.var3);
  13.     }
  14.  
  15.  
  16.     anotherMethod() {
  17.         this.var1 = this.var2 + this.var3;
  18.     }
  19. }
  20.