Skip to content

Conversation

@BryanSJamesDev
Copy link

In the brush.js code:

I replaced the following line of code
var N_PREVIOUS_SPEEDS = 15; //how many previous speeds we store

with:
const N_PREVIOUS_SPEEDS = 15; //how many previous speeds we store

Reason:
In this case, N_PREVIOUS_SPEEDS is intended to represent the number of previous speeds stored, and its value is not expected to change. By using const, you provide clarity to anyone reading the code that this variable is meant to be constant throughout the program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant