I'm using JQuery for some time now, but there is one thing that still riddles me.

Look at this function:

```
jQuery.each(function(index) { ... });
jQuery.each(function(index, value) { ... });

```

How do I know - without looking at examples (or api.jquery.com) - that the callback function has an
`index` (or `index, value`) as parameters? 

Another one:

```
jQuery.ajax({url: "test.jsp", cache: false}).done(function( data ) { ... });

```

How do I know, that jQuery.ajax can have a JSON object `url` and `cache` and whatever? 
And more, where is that `done` coming from?

AFAIK, there is little support from the IDEs in terms of code completion, so this seems a complicated issue for JS parsers of IDEs.

Thank you.

Regards,
Bernie

PS: Naturally I'm a Java man, JS is still weird to me ;-)