SyntaxError: malformed formal parameter (Firefox)Error type 무ìì´ ì못 ëììê¹ì?
ì½ëìë ìµìí ë ê°ì ì¸ìê° ì ë¬ ë Function()
ìì±ìê° ììµëë¤. ë§ì§ë§ ì¸ìë ìì±ì¤ì¸ ì í¨ìì ìì¤ì½ë ì
ëë¤. ë머ì§ë 모ë ì í¨ìì ì¸ì 목ë¡ì 구ì±í©ëë¤.
ì¸ì 목ë¡ì´ ì´ëê° ì못ëììµëë¤. ìë§ë ì¤ìë¡ ì¸ì ì´ë¦ì¼ë¡ if ëë varì ê°ì í¤ìë를 ì ííê±°ë ì¸ì 목ë¡ì ê°ê³³ ìì 구ëì ì´ ìì ì ììµëë¤. ëë ì¤ìë¡ ì«ìë ê°ì²´ì ê°ì ì못ë ê°ì ì ë¬í ê²ì¼ ì ììµëë¤.
ê·¸ë, ë´ ë¬¸ì ê° í´ê²°ëì´. ê·¼ë° ì ë§ ìí´ì¤¬ì´?í림 ìì´ ì¤ë¥ ë©ì¸ì§ì ííì ë¤ì ì´ìí ë¶ë¶ì´ ììµëë¤. "ê³µì ë§¤ê° ë³ì"ë "í¨ì ì¸ì"를 ë§íë ì¢ì ë°©ë²ì ëë¤. ì°ë¦¬ë "ì못ë íìì ë¨ì´ë¥¼ ì¬ì©íë¤"ë¼ê³ íí í©ëë¤.
Examples Invalid casesvar f = Function("x y", "return x + y;");
// SyntaxError (missing a comma)
var f = Function("x,", "return x;");
// SyntaxError (extraneous comma)
var f = Function(37, "alert('OK')");
// SyntaxError (numbers can't be argument names)
Valid cases
var f = Function("x, y", "return x + y;"); // correctly punctuated
var f = Function("x", "return x;");
// if you can, avoid using Function - this is much faster
var f = function (x) {
return x;
};
See also
Function()
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4