I met this line of code and have no idea what '!!' is:
isLoggedIn() {
return !!this.getJwtToken();
}
can anyone please help?
I met this line of code and have no idea what '!!' is:
isLoggedIn() {
return !!this.getJwtToken();
}
can anyone please help?
This notation is used to get the Boolean value of a variable.
In your case it would return false if this.getJwtToken(); is either undefined, null, false or simply an "" empty string.