ProUnebit
8/25/2018 - 9:00 PM

object-keys_and_map-key-value

from my React project

let ingredients = {
                salad: 0,
                bacon: 1,
                cheese: 0,
                meat: 0
            }
            
const ingredientSummary = Object.keys(ingredients);
console.log(ingredientSummary)

ingredientSummary.map(igKey => {
    return console.log(igKey + " : " + ingredients[igKey])
})