For more detailed information on this: Tips for JavaScript