Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
</head>
<body>
  <div id="logger"></div>
</body>
</html>
  
 
function Foo() {
  this['c'] = 'c';
  this['d'] = 'd';
}
Foo.prototype = {
  'a': 'a',
  'b': 'b'
};
function log(txt) {
  document.getElementById('logger').innerHTML +=
    txt + '<br>';
}
for (var i in new Foo) {
  log(i);
}
log($.isPlainObject(new Foo));
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers