easyJS ES6+#67

Destructuring and default params

Prompt

Create a function createUser that takes an object with name and email, with defaults: { name: 'Anonymous', email: 'unknown@example.com' }. Use destructuring in the function signature. Calling createUser() with no arguments must also work.

Hints

Solution

Your Code

5 min

Tests

Click Run to test your code