User Tools

Site Tools


java-script:for-in-vs-for-of

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
java-script:for-in-vs-for-of [2023/08/10 03:02] odeftajava-script:for-in-vs-for-of [2023/08/11 12:22] (current) odefta
Line 75: Line 75:
 However, you can convert an object's keys, values, or key-value pairs into an array and then iterate over that array with a for...of loop. \\  However, you can convert an object's keys, values, or key-value pairs into an array and then iterate over that array with a for...of loop. \\ 
 Example: Example:
-<code>+<code javascript>
 const person = { const person = {
   name: 'Alice',   name: 'Alice',
java-script/for-in-vs-for-of.1691625771.txt.gz · Last modified: 2023/08/10 03:02 by odefta