← Back to context

Comment by test6554

8 years ago

Great job! One way to improve this code is to add comments. Use comments to describe what each function does and what the parameters are supposed to be. Then you can tell at a glance what the function does without having to analyze the code later on.

Us old people tend to forget things.

Also, if you use JSDoc a lot of modern editors can use that to automatically provide type hinting, documentation references on mouseover, etc.