When I add items to the beats array and then console.log the User, I\'m getting the correct number of items in the array. But when I check .length, I always get 1. Trying to ca
In environments that support the spread operator you may now do the following:
this.addBeats = function (beats) {
return this.beats.push(...beats);
};
Or if you need more control for overwriting etc
this.addBeats = function(beats) {
return this.beats.splice(this.beats.length, null, ...beats);
};