Answers for "parameters and arguments"

3

function arguments

function createMenu({ title, body, buttonText, cancellable }) {
  // ...
}

createMenu({
  title: "Foo",
  body: "Bar",
  buttonText: "Baz",
  cancellable: true
});
Posted by: Guest on September-02-2021
0

paramters and arguments

Can a JavaScript function have no parameters?
JavaScript functions can be invoked with any number of arguments, regardless of the number of arguments named in the function definition. Because a function is loosely typed, there is no way for it to declare the type of arguments it expects, and it is legal to pass values of any type to any function
Posted by: Guest on January-23-2022
0

argument and parameter

function myFunction(paramOne, paramTwo){
	//paramOne and paramTwo above are parameters
	//do something here
    return paramOne + paramTwo
}

myFunction(1,2) // 1 & 2 are arguments
Posted by: Guest on December-06-2021

Code answers related to "parameters and arguments"

Browse Popular Code Answers by Language