13 lines
291 B
JavaScript
13 lines
291 B
JavaScript
"use strict";
|
|
|
|
var _applyConstructor = function (Constructor, args) {
|
|
var instance = Object.create(Constructor.prototype);
|
|
|
|
Constructor.apply(instance, args);
|
|
|
|
return instance;
|
|
};
|
|
|
|
_applyConstructor(Numbers, Array.from(nums));
|
|
_applyConstructor(Numbers, [1].concat(Array.from(nums)));
|