Preheat your oven to 350°F (175°C) and line a baking sheet with parchment paper.
In a medium bowl, whisk together the flour, baking soda, baking powder, and salt.
In a large bowl, cream the butter and sugar until light and fluffy.
Beat in the egg and vanilla extract, then stir in the mashed bananas.
Gradually add the dry ingredients to the wet mixture, stirring until just combined.
Fold in chocolate chips or nuts if desired.
Drop rounded tablespoons of dough onto the prepared baking sheet.
Bake for 12–15 minutes, or until edges are lightly golden.
Let cookies cool for 5 minutes on the pan, then transfer to a wire rack.