--- id: 587d7b87367417b2b2512b43 title: Use Arrow Functions to Write Concise Anonymous Functions challengeType: 1 videoUrl: '' localeTitle: '' --- ## Description undefined ## Instructions undefined ## Tests
```yml tests: - text: '' testString: 'getUserInput => assert(!getUserInput("index").match(/var/g), "User did replace var keyword.");' - text: '' testString: 'getUserInput => assert(getUserInput("index").match(/const\s+magic/g), "magic should be a constant variable (by using const).");' - text: '' testString: 'assert(typeof magic === "function", "magic is a function.");' - text: '' testString: 'assert(magic().getDate() == new Date().getDate(), "magic() returns correct date.");' - text: '' testString: 'getUserInput => assert(!getUserInput("index").match(/function/g), "function keyword was not used.");' ```
## Challenge Seed
```js var magic = function() { "use strict"; return new Date(); }; ```
## Solution
```js // solution required ```