Using unsalted butter allows you to have full control over the amount of salt in the cookie dough. However, if you only have salted butter, you can use it and slightly reduce the added salt amount.