nature-of-code / noc-book-2

Nature of Code with p5.js and Notion workflow / build system.
https://natureofcode.com
762 stars 52 forks source link

Chp 6: const vs let for destructuring (proposal) #926

Closed ManoylovAC closed 1 month ago

ManoylovAC commented 1 month ago

In the section on destructuring, you suggest using the const keyword for cases with library, but some of the examples use let again. For consistency, you can add const to all such cases with library classes destructuring.

image

vs

image
shiffman commented 1 month ago

Ah, thanks for catching this! I will fix definitely for the website, but it might not make it into the print book, we'll see if I can squeeze it in, it's off to the printer on April 9!

shiffman commented 1 month ago

Made some adjustments in #931 take a look!