Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

argument vs parameter javascript

var foo = function( a, b, c ) {}; // a, b, and c are the parameters

foo( 1, 2, 3 ); // 1, 2, and 3 are the arguments
Comment

js parameter vs argument

function example(parameter) {
  console.log(parameter); // Output = foo
}

const argument = 'foo';

example(argument);

// Function parameters are the names listed in the function's definition.
// Function arguments are the real values passed to the function.
// Parameters are initialized to the values of the arguments supplied.

// Reference: https://developer.mozilla.org/en-US/docs/Glossary/Parameter
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript return 
Javascript :: eslint disable line 
Javascript :: angular material button color 
Javascript :: js reading file 
Javascript :: react-router in saga 
Javascript :: jquery is not defined error in wordpress 
Javascript :: cheapest node js hosting 
Javascript :: javascript catch all click events 
Javascript :: jquery parse url parameters 
Javascript :: js class syntax 
Javascript :: variables dinamicas javascript 
Javascript :: javascript array foreach 
Javascript :: declare int in javascript 
Javascript :: javascript add to string 
Javascript :: .reduce mdn 
Javascript :: jquery repeat event on click 
Javascript :: how to append a data to list in redux 
Javascript :: .index of javascript 
Javascript :: sintax arrow function in javascript 
Javascript :: document get element by id hover 
Javascript :: how fetch multiple data in javascript react 
Javascript :: scroll top javascript 
Javascript :: set state 
Javascript :: ?? javascript 
Javascript :: formdata upload file 
Javascript :: iframe content zoom in and zoom out jquery 
Javascript :: javascript array with random values 
Javascript :: row auto textarea 
Javascript :: JavaScript substring Syntax 
Javascript :: Why do you need JSON 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =