Reputation: 6926
I have an array with
[1,2,3,4,5]
I want to move "2" right (1 position at the time) or move "2" left
Can we do that with RxJS Operators?
Upvotes: 1
Views: 7706
Reputation: 914
you can do it with regular javascript
Array.prototype.move = function(from, to) {
this.splice(to, 0, this.splice(from, 1)[0]);
};
Upvotes: 6