Arrange a rack in the bottom third of the oven and heat the oven to 350°F. Line an 8x5-inch loaf pan with parchment paper, letting the excess hang over the long sides to form a sling. Spray the inside with cooking spray. If using nuts, toast ½ cup chopped nuts in the oven for 10 minutes as the oven is pre-heating.
Melt 8 tablespoons (1 stick) unsalted butter in the microwave or over low heat on the stovetop. Place the melted butter and 1 cup granulated sugar in a large bowl and whisk until well combined.
Crack 2 large eggs into the bowl. Whisk until completely combined and the mixture is smooth.
Whisk ¼ cup milk and 1 teaspoon vanilla extract into the batter.
Peel 3 very ripe, medium bananas and add them to the bowl. Using the end of the whisk or a dinner fork, mash them into the batter.
Measure 2 cups all-purpose flour, 1 teaspoon baking soda, and ¼ teaspoon kosher salt into the bowl. Switch to using a spatula and gently stir until the ingredients are just barely combined and no more dry flour is visible.
Scatter the toasted nuts or ½ cup chocolate chips over the batter and gently fold them in.
Pour the batter into the prepared loaf pan, using the spatula to scrape all the batter from the bowl. Smooth the top of the batter.
Bake until the top of the cake is caramelized dark brown with some yellow interior peeking through and a toothpick comes out clean, about 50 to 65 minutes.
Set the loaf, still in the pan, on a wire cooling rack and let it cool for 10 minutes.
Grasping the parchment paper sling, lift the loaf out of the pan and place on the cooling rack. Cool for another 10 minutes before slicing.