I currently use a annonymous function for the jquery ajax success-response.

```
success: function(data){
  code
},

```

When Trying to use a named function:

```
success: success(data),

```

It claims the the variable data is not set. I suppose i could do 

```
success: function(data){
  success(data)
},

```

But this feels like it's not how it's suppose to be done. Why is it behaving this way and what should I do about it?