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

204
Vistas
How to use a parameter outisde a function (JavaScript)

I'm looking for a way to use a parameters outside his function, i wrote this:

await checkrequest(checkoptions, async function (error, response, body) {
                await console.error('error:', error); // Print the error if one occurred
                await console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received
                await console.log('body:', body);
                var string;
                string = body.toString();
            });
        }while(string.includes("NotFound") == true)

But the body in the while Is not seen as already declared, I also tried to put the "var string" outside the function, but nothing, it doesnt take the body value.

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