I found some code about authentication with angular and i can't understand this trick :
authService.isAuthenticated = function () {
return !!Session.userId;
};
What does !!
mean 'different of userId' ?
whenever true = !!true = !!!!true =>etc
, it don't understand this.
Somebody can help me?
(https://medium.com/opinionated-angularjs/techniques-for-authentication-in-angularjs-applications-7bbf0346acec for the source , part 'The AuthService')