If you notice yourself trying to do too much in a single function, break it down into helper functions, and have your function just call those helper functions. Give the helper functions descriptive names, such that when you read the main function, you know exactly what is happening, without looking at the implementation of the helper functions.
This is a good place to start learning JavaScript: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps
If you're interested in documentation, here's a complete reference documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference
287 replies
Important Information
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.