The conversation between human and AI assistant.
[|Human|] Identify the purpose of the given function and rewrite it in a simpler form.
[|AI|] The purpose of the function is to greet the user by displaying a message, either using the user's name or with the word 'there' as a default, in case no name is provided. Here is the function rewritten in a simpler form:

```javascript
function greetUser(name) {
    if (!name) {
        name = 'there';
    }
    alert(`Hello, ${name}!`);
}
```
[|Human|] 
Identify the purpose of the given function and rewrite it in a simpler form.