In PHP we can find out from which instance an object comes through the function get_class
.
So:
$ao = new ArrayObject;
get_class($ao); // ArrayObject
And in the javascript? How can we do this?
Example:
var f = new FormData();
console.log(/** Qual é o nome da classe de 'f' **/)