Preheat oven to 375°F. Grease your preferred pan (either a 15x10 inch jelly roll pan, a 13x9 inch pan, or a 9x9 inch pan) with cooking spray.
Place the butter, granulated sugar, and brown sugar in the bowl of a stand mixer (you can also use a hand mixer). Beat on high until light and fluffy.
Add the eggs and vanilla, and mix to combine. Scrape down the sides of the bowl as necessary.
Add the flour, salt, and baking soda, and mix just until combined. Stir in the chocolate chips and nuts, if using.
Transfer the mixture to the pan and bake.
15x10 inch pan: 18–22 minutes
13x9 inch pan: 23–27 minutes
9x9 inch pan: 32–35 minutes (cover loosely with aluminum foil after 25 minutes if the bars are getting too brown on top)
Let cool before cutting into squares.
Notes
The 15x10 inch pan will create the thinnest cookie bar; it'll be chewy and crisp on the edges. The 9x9 inch pan will create a thick, gooey cookie bar. The 13x9 inch pan will be somewhere in between chewy and gooey! Store leftover cookie bars in an airtight container at room temperature for 1–2 weeks. You can also freeze the cookie bars for up to 3 months.Variations: swap any of these for the chocolate chips: toffee bits, dried cranberries or dried cherries, M&Ms, mini Oreos, butterscotch chips, or white chocolate chips. You can also add the zest of 1–2 oranges to the dough (along with the eggs)—this is especially nice with white chocolate chips.