Plain language guide to JavaScript performance:

* Don't do a lot
* Don't do something multiple times that only needs doing once
* Don't save things you later won't need
* Aim for fast code, not neat or terse code
* NEW: Don't download it if you're not going to use it
* NEW: Don't do it with JS if CSS or the browser can do it instead
* NEW: Don't do in the browser what can be done on the server

Edit: thanks for the suggestions!

That's all I can think of.

@heydon one more for you:
* Don't do things the browser does for you
@heydon * Don't download code you won't run.
@twifkak @heydon And more importantly: don’t run just any code you downloaded.

@heydon Keep it small. Keep it simple.

True for all code tbh 😅