What is baking soda used for in cookies?

Baking soda, also known as sodium bicarbonate, is a common ingredient used in baking for its leavening properties. When baking soda reacts with an acidic ingredient, it releases carbon dioxide gas, causing the dough or batter to rise and become fluffy. In cookies, baking soda is often used in conjunction with other acidic ingredients such as brown sugar, molasses, or buttermilk to produce a light and airy texture. Additionally, baking soda can help to balance the sweetness of cookies and enhance their overall flavor.