01 - Preheat oven to 350°F (175°C). Grease a 9-inch round cake pan.
02 - In a large mixing bowl, beat the softened butter and granulated sugar until light and fluffy.
03 - Add eggs one at a time, beating well after each addition, then mix in the vanilla extract.
04 - Stir in the mashed bananas until evenly combined.
05 - In a separate bowl, whisk together the all-purpose flour, baking soda, and salt.
06 - Gradually add the dry ingredients to the banana mixture, alternating with the milk, mixing until just incorporated.
07 - Pour the batter into the prepared cake pan and gently smooth the top.
08 - Sprinkle chopped walnuts over the batter if using.
09 - Bake for 30-35 minutes, or until a toothpick inserted in the center comes out clean.
10 - Remove from oven and allow to cool in the pan for 10 minutes before transferring to a wire rack to cool completely.