Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

230
Views
How can I link multiple JavaScript files inside of one linked JavaScript file without using node.js

If I have an HTML document with one external JS file attached (I would like to keep it to one) [let's say the file is called index.js] is there a way to link other javascript files from within the index.js file so that the other JS files would also be included?

example structure:

/index.html
/index.js
/other-js-file.js
/another-js-file.js

So here's what I'd like to do inside of index.js:

include/import/something-like-that "other-js-file.js"
include/import/something-like-that "another-js-file.js"

function xyz(){
  //do stuff..
}

so that my project could access all of the functions in all of the different files. I am trying to keep the code from the JS files in smaller files for easier maintenance. I'd also like to do this to avoid having a huge list of JS files in my HTML document.

Any suggestions? Thanks!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

An import statement should do just fine

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!