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

308
Vistas
Which version of Javascript

Note: I know this is probably a simple and basic question but I just started to learn Javascript a couple of year ago when all these changes started taking place and it seems I learned the old version.

I'm confused with Javascript. I'm trying to implement a basic MEAN stack. I'm using es6 Javascript with Nodejs (6.x) on the server side. Then for the client side, I'm using Angular 1.5 in es5 Javascript, but it seems to not be working.

Is is possible to mix es6 on server-side and use es5 on client-side OR is all or nothing... all es6 on both server/client or vice versa?

UPDATE Thanks for all the info. I've been looking at ES6(ES2015) and it doesn't seem that hard, I've even written some code in it with success. However, I just got a handle on Angular 1 a while back and then it seems like Angular 1.6 and up came out and was quite different. Angular 1 had quite the learning curve, how hard would it be to update my Angular 1 code into 1.6 or above? Is the newer Angular written in ES6? All frontend JS written in ES6 needs a tranpiler or can browsers handle ES6 now?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Is is possible to mix es6 on server-side and use es5 on client-side

Yes you could mix both. But be aware that sharing code between both could be tricky.

is all or nothing... all es6 on both server/client or vice versa?

That's not the case here, but I would recommended to use on both sides es6 and convert to es5 for the browser, eg with Babel

over 4 years ago · Santiago Trujillo Denunciar

0

Is is possible to mix es6 on server-side and use es5 on client-side OR is all or nothing... all es6 on both server/client or vice versa?

It's possible to mix entirely separate languages on the server and client, such as PHP or Java or Ruby or C# on the server and JavaScript on the client. So yes, it's just fine if you want to use ES2015 (aka "ES6") and later features in your server-side Node code and restrict yourself to ES5 and earlier features in your client-side browser code.

You don't have to, though, and it's surprisingly hard once you get used to writing let and const and arrow functions to make yourself not write them in your client-side code by accident. So for that reason, you might consider using ES2015+ plus both server-side and client-side, and "transpiling" your client-side code from ES2015+ down to ES5 for use on older browsers. There are multiple transpilers, such as Babel. You can develop with an up-to-date browser such as Chrome or Firefox or Edge, and then have your build tool make the "production" build pass all the client-side code through Babel (perhaps with Webpack or Browserify or similar) for use on older browsers such as IE11.

over 4 years ago · Santiago Trujillo 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