class SimpleMath { constructor( n ) { this.n = n; } static given( n ) { return new SimpleMath( n ); } add( m ) { this.n += m; return this; } subtract( m ) { this.n -= m; return this; } multiply( m ) { this.n *= m; return this; } divide( m ) { this.n /= m; return this; } value() { return this.n; } } function given(n) { return SimpleMath.given(n); // or new SimpleMath(n); }