🔥 Black Friday Sale! Today through Monday, save 50% on every pocket guide, video course, and enrollment in the Vanilla JS Academy. If you buy a pocket guide bundle or join Academy, you'll also get $436 in free bonus gifts. This sale ends Monday, so don't wait!
- IIFE. Used when you want your code to run immediately, but want to keep all of your variables and functions out of the global scope to avoiding conflicts. Stands for Immediately Invoked Function Expression.
- Revealing Module Pattern. Allows you to keep most of your variables and functions out of the global scope, but make some of them publicly available. Example: a helper library like lodash.
- Constructor Pattern. Create multiple instances of script that share methods but contain unique information. Example: a DOM manipulation library like jQuery.
- Revealing Constructor Pattern. Create multiple instances of script with public and private methods. Example: a plugin.
- Settings and Options. Let users pass in options to customize the script. Works with any of the patterns.
- Performance Test. Write simple vanilla JS performance tests.