我們的志工尚未將本文翻譯為 正體中文 (繁體) 版本。加入我們,幫忙翻譯!
您也可以閱讀本文的 English (US) 版本。

Message

SyntaxError: missing ) after argument list

Error type

SyntaxError.

What went wrong?

There is an error with how a function is called. This might be a typo, a missing operator, or an unescaped string, for example.

Examples

Because there is no "+" operator to concatenate the string, JavaScript expects the argument for the log function to be just "PI: ". In that case, it should be terminated by a closing parenthesis.

console.log('PI: ' Math.PI);
// SyntaxError: missing ) after argument list

You can correct the log call by adding the "+" operator:

console.log('PI: ' + Math.PI);
// "PI: 3.141592653589793"

See also

文件標籤與貢獻者

 此頁面的貢獻者: nmve, fscholz
 最近更新: nmve,