QueryArray elements (an ivar that is a fixed array)
class QueryArray { //--------------------------------- //Instance Variables //elements --an ivar that is a fixed array //--------------------------------- //Constructors static from(elements) { return new this(elements); } constructor(elements) { this.elements = elements; } //--------------------------------- //Core toString() { return this.elements.toString(); } } //Test It let array = [10, 20, 30, 40]; let qarray = new QueryArray(array); println(qarray.toString());