# isAnonymous

Learn how to check whether the user is anonymous.

This method checks whether the current session is anonymous.

It is a shorthand for calling the [`user.isAnonymous`](/reference/sdk/javascript/api/user/is-anonymous) method.

## Signature

This method has the following signature:

```ts
croct.isAnonymous(): boolean
```

The return is `true` if the user is anonymous, `false` otherwise.

## Example \[#isanonymous-example]

Here is a basic example of how to use this method:

```ts
import croct from '@croct/plug';

console.log(croct.isAnonymous()); // true

croct.identify('00000000-0000-0000-0000-000000000000');

console.log(croct.isAnonymous()); // false
```
