Preheat your oven to 350°F (175°C). Grease a 9x13-inch baking pan or line it with parchment paper for easy removal.
In a medium bowl, combine the flour, baking soda, baking powder, salt, and cinnamon. Whisk together until well mixed.
In a large bowl, whisk together the granulated sugar, brown sugar, and vegetable oil until smooth. Add the eggs and vanilla extract, mixing until fully incorporated.
Gradually add the dry ingredients to the wet mixture, stirring until just combined. Do not overmix.
Fold in the grated zucchini, chocolate chips, and walnuts (if using) until evenly distributed.
Pour the batter into the prepared baking pan, spreading it evenly with a spatula.
Bake for 25-30 minutes, or until a toothpick inserted in the center comes out clean. Allow to cool in the pan for about 10 minutes before transferring to a wire rack to cool completely.
Once cooled, cut into squares and serve.