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

134
Vistas
JS arguments vs parameters

Different sources explain it in a different ways. In the below example, which are arguments and which are parameters?

 const add = function(number1, number2){
       return number1 + number2
           }

    add(3,10)

thanks!

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

0

Edit: as another user pointed out, this is a duplicate. What is the difference between arguments and parameters in javascript?


Arguments are what's passed to a function at runtime. Parameters are what are defined in the function definition and alias the arguments.

Parameters are variables listed as a part of the function definition.

Arguments are values passed to the function when it is invoked.

Source: https://codeburst.io/parameters-arguments-in-javascript-eb1d8bd0ef04

function moo(number1, number2) {} // parameters are defined

moo(10, 50, 100); // arguments are passed.
// notice that more than the specified number of parameters
// can be supplied and accessed via 'arguments'

Also see arguments:

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

about 4 years ago · Juan Pablo Isaza Denunciar

0

Parameters are variables listed as a part of the function definition. Arguments are values passed to the function when it is invoked.

const add = function(number1, number2){ //Arguments
   return number1 + number2 //Parameters
       }

add(3,10)
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