firebase hash field in firestore code example
Example 1: how to edited the firestore from front-end
const b = document.createElement('button');b.textContent = '+100';b.onclick = () => updatePopulation(city.name, city.pop + 100);p.appendChild(b);
Example 2: how to edited the firestore from front-end
const updatePopulation = (city, pop) => { cities.doc(city).update({ pop: pop })}