I am trying to rework my code that currently uses callbacks to use `async`, `await`. The only thing is that in my current setup i am a little bit confused about how it should be written.

The setup is that:

1. i click a button that triggers `clicker` function
2. `clicker` function triggers `ajax` function
3. `ajax` function does `fetch` request
4. after response is back I need to pass response to `clicker` function

Currently I am getting `undefined` from `ajax` function, could someone help and point out what is the problem?

```js
var ajax = function() {
 fetch('https://jsonplaceholder.typicode.com/todos/1')
  .then(response => response.json())
  .then(json => { console.log('ajax function', json); return json; })
  .catch(error => console.log(error))
};

var clicker = async function() {
 var a = await ajax();
 console.log('clicker function', a);
};
```

```html
<div onclick="clicker(event, this);">
 Test Me
</div>
```