From 4289bf1fbb823f410775b4c7d0533b7abd8e5f5f Mon Sep 17 00:00:00 2001 From: 3indblown Leaf <69508345+kraccoon-dev@users.noreply.github.com> Date: Tue, 1 Feb 2022 19:42:11 +0900 Subject: remove class 1 (#3922) --- .../reference/lexical_grammar/index.html | 62 +++++++++++----------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'files/ko/web/javascript/reference/lexical_grammar') diff --git a/files/ko/web/javascript/reference/lexical_grammar/index.html b/files/ko/web/javascript/reference/lexical_grammar/index.html index 1f2349bc1a..c127dcd69c 100644 --- a/files/ko/web/javascript/reference/lexical_grammar/index.html +++ b/files/ko/web/javascript/reference/lexical_grammar/index.html @@ -166,7 +166,7 @@ translation_of: Web/JavaScript/Reference/Lexical_grammar

첫 번째, '//'로 첨언하기입니다. 이는 아래의 예시처럼 같은 줄에 있는 모든 코드를 주석으로 바꿉니다.

-
function comment() {
+
function comment() {
   // 자바스크립트의 각주 한 줄입니다.
   console.log("Hello world!");
 }
@@ -177,7 +177,7 @@ comment();
 
 

예를 들면, 한 줄에 첨언할 때는 이렇게 쓸 수 있습니다 :

-
function comment() {
+
function comment() {
   /* 자바스크립트 각주 한 줄입니다. */
   console.log("Hello world!");
 }
@@ -185,7 +185,7 @@ comment();

여러 줄로 첨언할 때는, 이렇게 씁니다 :

-
function comment() {
+
function comment() {
   /* This comment spans multiple lines. Notice
      that we don't need to end the comment until we're done. */
   console.log("Hello world!");
@@ -196,13 +196,13 @@ comment();

function comment(x) {

-
  console.log("Hello " + x /* insert the value of x */ + " !");
+
  console.log("Hello " + x /* insert the value of x */ + " !");
 }
 comment("world");

게다가, 코드 실행을 막기 위해 코드를 무용화 시키는데도 사용할 수 있습니다. 아래처럼 코드를 코멘트로 감싸는 거죠:

-
function comment() {
+
function comment() {
   /* console.log("Hello world!"); */
 }
 comment();
@@ -218,7 +218,7 @@ comment();

The hashbang comment specifies the path to a specific JavaScript interpreter
that you want to use to execute the script. An example is as follows:

-
#!/usr/bin/env node
+
#!/usr/bin/env node
 
 console.log("Hello world");
 
@@ -331,14 +331,14 @@ console.log("Hello world");

Reserved words actually only apply to Identifiers (vs. IdentifierNames) . As described in es5.github.com/#A.1, these are all IdentifierNames which do not exclude ReservedWords.

-
a.import
+
a.import
 a['import']
 a = { import: 'test' }.
 

On the other hand the following is illegal because it's an Identifier, which is an IdentifierName without the reserved words. Identifiers are used for FunctionDeclaration, FunctionExpression, VariableDeclaration and so on. IdentifierNames are used for MemberExpression, CallExpression and so on.

-
function import() {} // Illegal.
+
function import() {} // Illegal.

리터럴

@@ -346,20 +346,20 @@ a = { import: 'test' }.

See also null for more information.

-
null
+
null

불리언 리터럴

See also Boolean for more information.

-
true
+
true
 false

숫자 리터럴

10진법

-
1234567890
+
1234567890
 42
 
 // Caution when using with a leading zero:
@@ -373,7 +373,7 @@ false

The decimal exponential literal is specified by the following format: beN; where b is a base number (integer or floating), followed by e char (which serves as separator or exponent indicator) and N, which is exponent or power number – a signed integer (as per 2019 ECMA-262 specs): 

-
0e-5   // => 0
+
0e-5   // => 0
 0e+5   // => 0
 5e1    // => 50
 175e-2 // => 1.75
@@ -384,7 +384,7 @@ false

Binary number syntax uses a leading zero followed by a lowercase or uppercase Latin letter "B" (0b or 0B). Because this syntax is new in ECMAScript 2015, see the browser compatibility table, below. If the digits after the 0b are not 0 or 1, the following SyntaxError is thrown: "Missing binary digits after 0b".

-
var FLT_SIGNBIT  = 0b10000000000000000000000000000000; // 2147483648
+
var FLT_SIGNBIT  = 0b10000000000000000000000000000000; // 2147483648
 var FLT_EXPONENT = 0b01111111100000000000000000000000; // 2139095040
 var FLT_MANTISSA = 0B00000000011111111111111111111111; // 8388607
@@ -392,7 +392,7 @@ var FLT_MANTISSA = 0B00000000011111111111111111111111; // 8388607

Octal number syntax uses a leading zero followed by a lowercase or uppercase Latin letter "O" (0o or 0O). Because this syntax is new in ECMAScript 2015, see the browser compatibility table, below. If the digits after the 0o are outside the range (01234567), the following SyntaxError is thrown: "Missing octal digits after 0o".

-
var n = 0O755; // 493
+
var n = 0O755; // 493
 var m = 0o644; // 420
 
 // Also possible with just a leading zero (see note about decimals above)
@@ -404,7 +404,7 @@ var m = 0o644; // 420
 
 

Hexadecimal number syntax uses a leading zero followed by a lowercase or uppercase Latin letter "X" (0x or 0X). If the digits after 0x are outside the range (0123456789ABCDEF), the following SyntaxError is thrown: "Identifier starts immediately after numeric literal".

-
0xFFFFFFFFFFFFFFFFF // 295147905179352830000
+
0xFFFFFFFFFFFFFFFFF // 295147905179352830000
 0x123456789ABCDEF   // 81985529216486900
 0XA                 // 10
 
@@ -413,7 +413,7 @@ var m = 0o644; // 420

The {{jsxref("BigInt")}} type is a numeric primitive in JavaScript that can represent integers with arbitrary precision. BigInt literals are created by appending n to the end of an integer.

-
123456789123456789n     // 123456789123456789
+
123456789123456789n     // 123456789123456789
 0o777777777777n         // 68719476735
 0x123456789ABCDEFn      // 81985529216486895‬
 0b11101001010101010101n // 955733
@@ -421,12 +421,12 @@ var m = 0o644; // 420
 
 

Note that legacy octal numbers with just a leading zero won't work for BigInt:

-
// 0755n
+
// 0755n
 // SyntaxError: invalid BigInt syntax

For octal BigInt numbers, always use zero followed by the letter "o" (uppercase or lowercase):

-
0o755n
+
0o755n

For more information about BigInt, see also JavaScript data structures.

@@ -434,7 +434,7 @@ var m = 0o644; // 420

To improve readability for numeric literals, underscores (_U+005F) can be used as separators:

-
// separators in decimal numbers
+
// separators in decimal numbers
 1_000_000_000_000
 1_050.95
 
@@ -453,7 +453,7 @@ var m = 0o644; // 420
 
 

Note these limitations:

-
// More than one underscore in a row is not allowed
+
// More than one underscore in a row is not allowed
 100__000; // SyntaxError
 
 // Not allowed at the end of numeric literals
@@ -467,7 +467,7 @@ var m = 0o644; // 420
 
 

See also {{jsxref("Object")}} and Object initializer for more information.

-
var o = { a: 'foo', b: 'bar', c: 42 };
+
var o = { a: 'foo', b: 'bar', c: 42 };
 
 // shorthand notation. New in ES2015
 var a = 'foo', b = 'bar', c = 42;
@@ -481,7 +481,7 @@ var o = { a: a, b: b, c: c };
 
 

See also {{jsxref("Array")}} for more information.

-
[1954, 1974, 1990, 2014]
+
[1954, 1974, 1990, 2014]

문자열 리터럴

@@ -497,14 +497,14 @@ var o = { a: a, b: b, c: c };

Any code points may appear in the form of an escape sequence. String literals evaluate to ECMAScript String values. When generating these String values Unicode code points are UTF-16 encoded.

-
'foo'
+
'foo'
 "bar"

16진수 이스케이프 시퀀스

Hexadecimal escape sequences consist of \x followed by exactly two hexadecimal digits representing a code unit or code point in the range 0x0000 to 0x00FF.

-
'\xA9' // "©"
+
'\xA9' // "©"
 

유니코드 이스케이프 시퀀스

@@ -513,7 +513,7 @@ var o = { a: a, b: b, c: c };

See also {{jsxref("String.fromCharCode()")}} and {{jsxref("String.prototype.charCodeAt()")}}.

-
'\u00A9' // "©" (U+A9)
+
'\u00A9' // "©" (U+A9)

유니코드 코드 포인트 시퀀스

@@ -521,7 +521,7 @@ var o = { a: a, b: b, c: c };

See also {{jsxref("String.fromCodePoint()")}} and {{jsxref("String.prototype.codePointAt()")}}.

-
'\u{2F804}' // CJK COMPATIBILITY IDEOGRAPH-2F804 (U+2F804)
+
'\u{2F804}' // CJK COMPATIBILITY IDEOGRAPH-2F804 (U+2F804)
 
 // the same character represented as a surrogate pair
 '\uD87E\uDC04'
@@ -530,7 +530,7 @@ var o = { a: a, b: b, c: c };

See also RegExp for more information.

-
/ab+c/g
+
/ab+c/g
 
 // An "empty" regular expression literal
 // The empty non-capturing group is necessary
@@ -541,7 +541,7 @@ var o = { a: a, b: b, c: c };
 
 

See also template strings for more information.

-
`string text`
+
`string text`
 
 `string text line 1
  string text line 2`
@@ -568,7 +568,7 @@ tag `string text ${expression} string text`

1. A semicolon is inserted before, when a Line terminator or "}" is encountered that is not allowed by the grammar.

-
{ 1 2 } 3
+
{ 1 2 } 3
 
 // is transformed by ASI into
 
@@ -578,7 +578,7 @@ tag `string text ${expression} string text`

Here ++ is not treated as a postfix operator applying to variable b, because a line terminator occurs between b and ++.

-
a = b
+
a = b
 ++c
 
 // is transformend by ASI into
@@ -598,7 +598,7 @@ a = b;
  
  • module
  • -
    return
    +
    return
     a + b
     
     // is transformed by ASI into
    -- 
    cgit v1.2.3-54-g00ecf