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

278
Vistas
Arguments Object is Empty Despite Setting Default Argument Value – is there a Workaround?

Given this function (e.g. in node.js)

> function f (a = 1) { return arguments; }
undefined
> f(1)
[Arguments] { '0': 1 } // arguments object contains value for argument a
> f()                  // invoke function f without argument
[Arguments] {}         // arguments object is empty despite default value

I need to be able to obtain default values if no argument is given.

Can anybody help me with this?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Straight from the docs: arguments is an Array-like object accessible inside functions that contains the values of the arguments passed to that function.

This means that arguments will only hold the values that are actually passed to the function when a call is made.

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