Salt can affect the way butter interacts with other ingredients, causing cookies to spread or become tough. As a result, it's generally best to use unsalted butter when baking cookies. That said, in a pinch, you can totally use salted butter!