JavaScript : How to remove some item from an array ?

One way to remove some item is take his position on array and remove by this.

Example:

var users = [];
users = editPlace.favorites;
var index = users.indexOf(Meteor.user()._id);
users.splice(index, 1);

Leave a comment