run thorugh map js code example
Example 1: iterate over map key value javascript
recipeMap.forEach((value, key) => {
console.log(`${key} costs ${value}`);
});
Example 2: js loop trough map
for (let key of map) {
console.log(key);
}
recipeMap.forEach((value, key) => {
console.log(`${key} costs ${value}`);
});
for (let key of map) {
console.log(key);
}