Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed a bug in brush.js #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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