These are guidelines I follow for clean, readable and performant javascript.