Question: I have this code

```
<div></div>
<form>
<input type="text" name="abc">
<input type="submit" value="send">
</form>

$('form').on('submit', function(){
   $.post('process.php', $(this).serialize(), function(data) {
    $('div').html(data);
   });
   return false;
});

```

Everything works but after submit value that I filled into input is gone and it's empty..Where can be problem?

Answer: 
In Chrome 62+ you can use [`queryObjects` from the console API](https://developers.google.com/web/tools/chrome-devtools/console/utilities#queryObjects) - which will **not work** in native JavaScript code but in the console so it's **great for debugging**.

```
class TestClass {};
const x = new TestClass();
const y = new TestClass();
const z = new TestClass();
queryObjects(TestClass)

```
Sorry for such a late reply, but I found myself trying to achieve this and I think this may be a simpler answer.

Say you want all instances of class MyClass, only get instances created at top window level (not including instances created inside a closure):

```
for (var member in window)
{
    if (window[member] instanceof MyClass)
        console.info(member + " is instance of MyClass");
}

```