1.) Keep the use of arrays to a minimum:
2.) Always define local variables first:
Therefore, every time a variable is looked into the scope chain, the engine goes through both the local and the global variables. This can result in lengthened time for execution of the operation, thus slowing down your website or your web application. As a rule of thumb, the engine first looks into the local variables and then finds its way to the global variables. Besides, it goes without saying that the local variables are extremely quick to look into as compared to global variables and therefore, it is always a wise option to transform your global variables into local ones for faster operation.
3.) Choose literal values and variables over arrays and object properties:
However, this does not mean that you do not make use of arrays and object properties ever. Nonetheless, you must ensure that when you do make use of these properties, you must also include a variable for an instant uplift in the performance of your web application.
4.) Never change the CSS Styles:
Usually, web developers refrain from changing the CSS styles and prefer to stick to changing the CSS class instead. The main reason for doing this is the problem of reflow. When you change the CSS style, including the size, font, height and the likes, there is a greater chance of reflow. It cannot be denied that reflow does occur in classes as well; however, its magnitude is much lesser.