aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/javascript/reference/errors/unexpected_token/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ko/web/javascript/reference/errors/unexpected_token/index.html')
-rw-r--r--files/ko/web/javascript/reference/errors/unexpected_token/index.html49
1 files changed, 49 insertions, 0 deletions
diff --git a/files/ko/web/javascript/reference/errors/unexpected_token/index.html b/files/ko/web/javascript/reference/errors/unexpected_token/index.html
new file mode 100644
index 0000000000..91704a6006
--- /dev/null
+++ b/files/ko/web/javascript/reference/errors/unexpected_token/index.html
@@ -0,0 +1,49 @@
+---
+title: 'SyntaxError: Unexpected token'
+slug: Web/JavaScript/Reference/Errors/Unexpected_token
+tags:
+ - 에러
+ - 자바스크립트
+translation_of: Web/JavaScript/Reference/Errors/Unexpected_token
+---
+<div>{{jsSidebar("Errors")}}</div>
+
+<h2 id="메시지">메시지</h2>
+
+<pre class="syntaxbox">SyntaxError: expected expression, got "x"
+SyntaxError: expected property name, got "x"
+SyntaxError: expected target, got "x"
+SyntaxError: expected rest argument name, got "x"
+SyntaxError: expected closing parenthesis, got "x"
+SyntaxError: expected '=&gt;' after argument list, got "x"
+</pre>
+
+<h2 id="에러_타입">에러 타입</h2>
+
+<p>{{jsxref("SyntaxError")}}</p>
+
+<h2 id="무엇이_잘못되었나요">무엇이 잘못되었나요?</h2>
+
+<p>특정 언어 구조를 예상했지만 무언가 다른 것이 있었습니다. 아마도, 간단한 오타일 것입니다.</p>
+
+<h2 id="예제">예제</h2>
+
+<h3 id="예상하지_못한_표현식">예상하지 못한 표현식</h3>
+
+<p>예를 들어, 함수를 호출할 때, 인수에서 마지막 부분에 콤마는 허용되지 않습니다. 자바스크립트는 계속해서 다른 인자가 있을 것이라고 기대하기 때문입니다.</p>
+
+<pre class="brush: js example-bad">Math.max(2, 42,);
+// SyntaxError: expected expression, got ')'
+</pre>
+
+<p>콤마를 생략하거나 다른 인수를 추가해 수정할 수 있습니다.</p>
+
+<pre class="brush: js example-good">Math.max(2, 42);
+Math.max(2, 42, 13+37);
+</pre>
+
+<h2 id="참조">참조</h2>
+
+<ul>
+ <li>{{jsxref("Math.max()")}}</li>
+</ul>