[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Errors/Missing_formal_parameter [Back]  [Original]

SyntaxError: missing formal parameter( ) - JavaScript | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

SyntaxError: missing formal parameter( )

SyntaxError:      

In this article

SyntaxError

?

" " - " ". . identifiers, , , . - . , () , , .

JavaScript, - ( "$" "_") . , , - .

. , :

js
function square(3) {
  return number * number;
};
// SyntaxError:   

function greet("Howdy") {
  return greeting;
};
// SyntaxError:   

function log({ obj: "value"}) {
  console.log(arg)
};
// SyntaxError:   

:

js
function square(number) {
  return number * number;
}

function greet(greeting) {
  return greeting;
}

function log(arg) {
  console.log(arg);
}

, :

js
square(2); // 4

greet("Howdy"); // "Howdy"

log({ obj: "value" }); // Object { obj: "value" }


Web Proxy Viewer  |  New URL  |  Original Page