🔸argument
a value passed into function as input.
JS ⟩ value ⟩ function ⟩ argument
- ...iterable expands an iterable in places where arguments are expected. 
// ⭐️ parameters:
//   • lie in function's definition (compile-time)
function foo( param1, param2, ... ) { ... }
//           ╰─── parameters ────╯
// ⭐️ arguments:
//   • values passed into function when called (run-time)
//   • parameters are initialized to these values.
//   • can be different on each call.
foo( 1, 'hello', false );
//  ╰─── arguments ───╯
foo( 2, 'world', false );
//  ╰─── arguments ───╯Last updated
Was this helpful?