<!DOCTYPE html>
<html>
<head>
<title>Loop</title>
</head>
<body>
<h2>for...in Loop</h2>
<script>
const person = { name: "John", age: 30, job: "Developer" };
for (let key in person) {
document.write(key + ": " + person[key], `<br>`);
}
</script>
</body>
</html>
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.