Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

234
Visualizações
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 Respostas
Responde à pergunta

0

An import statement should do just fine

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda