Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript key value loop

//< ES 2017:

Object.keys(obj).forEach(key => {
  let value = obj[key];
});

//>= ES 2017:

Object.entries(obj).forEach(
  ([key, value]) => console.log(key, value);
);
 
PREVIOUS NEXT
Tagged: #typescript #key #loop
ADD COMMENT
Topic
Name
1+9 =