Check out example codes for "typescript for loop key value pai". It will help you in understanding the concepts better.

Code Example 1

Object.entries(obj).forEach(
  ([key, value]) => console.log(key, value);
);

Code Example 2

for (let key in myDictionary) {
    let value = myDictionary[key];
    // Use `key` and `value`
}

Learn ReactJs, React Native from akashmittal.com