Useful tips for writing (better) JavaScript code