Relative Paths in JavaScript External Files
In JavaScript, relative paths in external files are interpreted differently based on whether the paths are specified in the same directory or a different directory.
Relative to the Page
When an external JavaScript file is included in a page using the