JavaScript is a widely used dynamic programming language. What started out as a client-side scripting language for browsers, is now used for large applications in many different settings. As for other dynamic languages, JavaScript makes it easy to write programs quickly without being constrained by the language, and programmers exploit that power to write highly dynamic programs. Automated tools for helping programmers and optimizing programs are used successfully for many programming languages. Unfortunately, the automated tools for JavaScript are not as good as for other programming languages. The program analyses, that the automated tools are built upon, are poorly suited to deal with the highly dynamic nature of JavaScript programs. The lack of language restrictions on the programmer are detrimental to the quality of program analyses for JavaScript. The aim of this dissertation is to address the highly dynamic nature of JavaScript programs in order to improve program analysis for JavaScript. This is done for two kinds of program analysis: dataflow analysis and type systems. We design, implement and evaluate new abstractions for dataflow analysis. These abstractions improve on state-of-the-art dataflow analyses, and indicate that good, automated tools for highly dynamic JavaScript programs are attainable. To aid the design of abstractions for both dataflow analyses and type systems, we have developed several methodologies. The methodologies aid the analysis designer in identifying the aspects of highly dynamic JavaScript programs that needs new abstractions.