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

196
Vistas
The below mentioned syntax seems logically wrong? (for loop -JavaScript)
i = 0;
for( ;i<3; ){
  alert(i++);
}

The above code should output a '1' after the first iteration as 'i' has been initialized as 0. Instead, the first alert brings up a '0'. How is this logically correct as the first output should've been the incremented value itself?alert(i++);
This is syntactically equal to the code

for (let i=0; i<3; i++)
{
    alert(i);
}
about 4 years ago · Juan Pablo Isaza
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