constructer

JavaScript
class Ball {
	constructor(w, h) {
		this.width = 100;
      this.height = 100;
	}
}
Source

Also in JavaScript: