Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

135
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!