Answers for "loop on obkect keys and values"

1

loop key in object

const fruits = { apple: 28, orange: 17 }

for(key in fruits){
	console.log(key)
}
Posted by: Guest on June-29-2020
1

js loop through object keys

for (const value of Object.values(obj)) { }
Posted by: Guest on October-26-2021

Code answers related to "loop on obkect keys and values"

Code answers related to "Javascript"

Browse Popular Code Answers by Language