Note: I am going to use a specific object as an example here, but please do not send answers specific to this example; the question is more general.
Specific example
I wrote jQuery code like this ...
$('#some_button').click(function(event) {
$.post('<some URL>', { <some parameters> },
function() { <do something on success> })
.error(function(x) {
});
event.preventDefault();
});
Now, for this question, let's assume that there is no documentation about this object xthat is being passed.
Obvious may be
alert(x);
but all that will be output [object Object].
General question
What could be an easy way to find out what properties / methods an unknown object has? Im thinking something that Id just writes in the debugging phase, without production code, of course.
You can assume jQuery is available.
Edit:
Im for (...), , , , / - , jQuery - ...