Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

233
Vistas
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 Respuestas
Responde la pregunta

0

An import statement should do just fine

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda