I am very new to Meteor (but not new to JavaScript) and am working my way through the Discover Meteor book.
I just encountered this section of code in the Creating Posts chapter:
Posts.allow({
insert: function(userId, doc) {
// only allow posting if you are logged in
return !! userId;
}
});
Either I am seeing things and am really in need of a break from looking at code, or this line contains an operator I’m unfamiliar with:
return !! userId;
What is the !!
operator?