---
title: "Discussion on \"Loop : for in & for of\" | Hashnode"
description: "Discussion on \"Loop : for in & for of\". for ...in loop\n\nCan only access 'key' of an object\n\nRepeat all iterable properties of an object\n  var obj = {\n      \"a\": 1,\n      \"b\": 2,\n      \"c\": 3\n  }\n\n  for (var prop in obj) {\n      console.log(`${prop}: ${obj[prop]}`)\n      // a: 1\n      // b:..."
url: "https://hashnode.com/posts/loop-for-in-for-of/66949f21af137e8a6cf20e7a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Loop : for in & for of](https://jaeyeonjung.hashnode.dev/loop-for-in-for-of?utm_source=hashnode&utm_medium=feed)

for ...in loop Can only access 'key' of an object Repeat all iterable properties of an object var obj = { "a": 1, "b": 2, "c": 3 } for (var prop in obj) { console.log(\`${prop}: ${obj\[prop\]}\`) // a: 1 // b:...

Jul 15, 2024 · 1 min read · jaeyeonjung.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#loops](https://hashnode.com/tag/loops)
-   [#es6](https://hashnode.com/tag/es6)

## Written by

[Jae Yeon Jung](https://hashnode.com/@jaeyeonjung)

@jaeyeonjung

  
[View profile](https://hashnode.com/@jaeyeonjung)

Front end developer in Korea

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
