How do I include a JavaScript file in another JavaScript file? Is there something in JavaScript similar to @import in CSS that allows you to include a JavaScript file inside another JavaScript file? Solution: JavaScript has no import, include, or require. (Update 2015: it does now with ES6 modules) There are other ways for JavaScript to include external JavaScript contents, though. Ajax Loading Load an additional script with an Ajax call and then use eval. This is the most straightforward way, but it is limited to your domain because