The for-in Statement
The for-in statement is used to enumerate the properties of an object. Here's the syntax:
for (property in expression)
statement
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
<script type="text/javascript">
for (var propName in window) {
document.write(propName);
}
</script>
</head>
<body>
</body>
</html>