Tag: for…of
-
How to use for…of loop with an Object in JavaScript
In my last post, I discussed Always Use the for…of loop to iterate in JavaScript. After this post, I got a question that, is it possible to use for…of loop with an object? Means, can you use the for…of loop to iterates properties of an object. Let us try this, let Product = { Id: 1, Title: 'Pen', Price: 1000, sendDetail: () => { }…