Skip to content

How to apply for of loop on objects#87

Open
harsh9899100 wants to merge 1 commit intohiteshchoudhary:mainfrom
harsh9899100:patch-1
Open

How to apply for of loop on objects#87
harsh9899100 wants to merge 1 commit intohiteshchoudhary:mainfrom
harsh9899100:patch-1

Conversation

@harsh9899100
Copy link
Copy Markdown

While I was making nnotes I found that,

-> We can use "Object.entries(myObject)"

for (const [key, value] of Object.entries(myObject)) {
console.log(key, ':-', value);
}

While I was making nnotes I found that,

-> We can use "Object.entries(myObject)"

for (const [key, value] of Object.entries(myObject)) {
  console.log(key, ':-', value);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant