Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

for loop on object js

// an easy way is to

const obj = {1: 'a', 2: 'b', 3: 'c',};

for (const i in obj)
  console.log(obj[i]);

//it is a simple way to loop on values of an object
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #loop #object #js
ADD COMMENT
Topic
Name
8+6 =