From c581ac7c5b0ba9552a0e34f467c4f62050e0c455 Mon Sep 17 00:00:00 2001 From: DevJo Date: Mon, 13 Dec 2021 19:50:12 +0900 Subject: remove: notranslate in web/javascript/reference/global_objects --- .../reference/global_objects/aggregateerror/index.html | 4 ++-- .../reference/global_objects/array/entries/index.html | 6 +++--- .../reference/global_objects/boolean/index.html | 12 ++++++------ .../reference/global_objects/boolean/tostring/index.html | 4 ++-- .../reference/global_objects/boolean/valueof/index.html | 4 ++-- .../reference/global_objects/date/now/index.html | 6 +++--- .../javascript/reference/global_objects/eval/index.html | 8 ++++---- .../reference/global_objects/isfinite/index.html | 4 ++-- .../reference/global_objects/json/stringify/index.html | 16 ++++++++-------- .../reference/global_objects/math/max/index.html | 6 +++--- .../global_objects/number/positive_infinity/index.html | 2 +- .../reference/global_objects/object/valueof/index.html | 10 +++++----- .../reference/global_objects/reflect/index.html | 6 +++--- 13 files changed, 44 insertions(+), 44 deletions(-) (limited to 'files/ko/web/javascript/reference/global_objects') diff --git a/files/ko/web/javascript/reference/global_objects/aggregateerror/index.html b/files/ko/web/javascript/reference/global_objects/aggregateerror/index.html index b83db1139e..947fb99d4b 100644 --- a/files/ko/web/javascript/reference/global_objects/aggregateerror/index.html +++ b/files/ko/web/javascript/reference/global_objects/aggregateerror/index.html @@ -33,7 +33,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/AggregateError

AggregateError 다루기

-
Promise.any([
+
Promise.any([
   Promise.reject(new Error("some error")),
 ]).catch(e => {
   console.log(e instanceof AggregateError); // true
@@ -45,7 +45,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/AggregateError
 
 

AggregateError 발생시키기

-
try {
+
try {
   throw new AggregateError([
     new Error("some error"),
   ], 'Hello');
diff --git a/files/ko/web/javascript/reference/global_objects/array/entries/index.html b/files/ko/web/javascript/reference/global_objects/array/entries/index.html
index 5b4b8eee78..71d7c8d48f 100644
--- a/files/ko/web/javascript/reference/global_objects/array/entries/index.html
+++ b/files/ko/web/javascript/reference/global_objects/array/entries/index.html
@@ -18,7 +18,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/entries
 
 

구문

-
arr.entries()
+
arr.entries()
 

반환 값

@@ -29,7 +29,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/entries

인덱스와 요소 이터레이팅

-
const a = ['a', 'b', 'c'];
+
const a = ['a', 'b', 'c'];
 
 for (const [index, element] of a.entries())
   console.log(index, element);
@@ -40,7 +40,7 @@ for (const [index, element] of a.entries())
 
 

for…of 루프 사용

-
var a = ['a', 'b', 'c'];
+
var a = ['a', 'b', 'c'];
 var iterator = a.entries();
 
 for (let e of iterator) {
diff --git a/files/ko/web/javascript/reference/global_objects/boolean/index.html b/files/ko/web/javascript/reference/global_objects/boolean/index.html
index 06618f3ffe..5bd6c73d96 100644
--- a/files/ko/web/javascript/reference/global_objects/boolean/index.html
+++ b/files/ko/web/javascript/reference/global_objects/boolean/index.html
@@ -20,7 +20,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Boolean
 
 

값이 {{jsxref("undefined")}}, {{jsxref("null")}}이 아닌 모든 객체는 조건문에서 true로 계산됩니다. 이는 값이 falseBoolean 객체도 포함합니다. 즉 아래 {{jsxref("Statements/if...else", "if")}} 문의 조건은 참입니다.

-
var x = new Boolean(false);
+
var x = new Boolean(false);
 if (x) {
   // 이 코드는 실행됨
 }
@@ -28,7 +28,7 @@ if (x) {
 
 

그러나 원시 Boolean 값에는 적용되지 않습니다. 따라서 아래 {{jsxref("Statements/if...else", "if")}} 문의 조건은 거짓입니다.

-
var x = false;
+
var x = false;
 if (x) {
   // 이 코드는 실행되지 않음
 }
@@ -36,12 +36,12 @@ if (x) {
 
 

불리언이 아닌 값을 변환할 때 Boolean 객체를 사용해선 안됩니다. 대신 Boolean 함수를 사용하세요.

-
var x = Boolean(expression);     // 추천
+
var x = Boolean(expression);     // 추천
 var x = new Boolean(expression); // 사용하지 말것

값이 falseBoolean 객체를 포함한 어떠한 객체를 Boolean 객체의 초기값으로 넘겨주더라도 새로운 Boolean 객체는 true를 가집니다.

-
var myFalse = new Boolean(false);   // 초기값 거짓
+
var myFalse = new Boolean(false);   // 초기값 거짓
 var g = Boolean(myFalse);           // 초기값 참
 var myString = new String('Hello'); // 문자열 객체
 var s = Boolean(myString);          // 초기값 참
@@ -68,7 +68,7 @@ var s = Boolean(myString); // 초기값 참

false 값으로 초기화한 Boolean 객체 만들기

-
var bNoParam = new Boolean();
+
var bNoParam = new Boolean();
 var bZero = new Boolean(0);
 var bNull = new Boolean(null);
 var bEmptyString = new Boolean('');
@@ -76,7 +76,7 @@ var bfalse = new Boolean(false);

true 값으로 초기화한 Boolean 객체 만들기

-
var btrue = new Boolean(true);
+
var btrue = new Boolean(true);
 var btrueString = new Boolean('true');
 var bfalseString = new Boolean('false');
 var bSuLin = new Boolean('Su Lin');
diff --git a/files/ko/web/javascript/reference/global_objects/boolean/tostring/index.html b/files/ko/web/javascript/reference/global_objects/boolean/tostring/index.html
index 5cdb2c1f47..b9d27a088c 100644
--- a/files/ko/web/javascript/reference/global_objects/boolean/tostring/index.html
+++ b/files/ko/web/javascript/reference/global_objects/boolean/tostring/index.html
@@ -19,7 +19,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Boolean/toString
 
 

구문

-
bool.toString()
+
bool.toString()

반환 값

@@ -37,7 +37,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Boolean/toString

toString() 사용하기

-
var flag = new Boolean(true);
+
var flag = new Boolean(true);
 flag.toString(); // false
 
diff --git a/files/ko/web/javascript/reference/global_objects/boolean/valueof/index.html b/files/ko/web/javascript/reference/global_objects/boolean/valueof/index.html index 50df1d98d2..b6ab9513e6 100644 --- a/files/ko/web/javascript/reference/global_objects/boolean/valueof/index.html +++ b/files/ko/web/javascript/reference/global_objects/boolean/valueof/index.html @@ -19,7 +19,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Boolean/valueOf

구문

-
bool.valueOf()
+
bool.valueOf()

반환 값

@@ -35,7 +35,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Boolean/valueOf

valueOf 사용하기

-
var x = new Boolean();
+
var x = new Boolean();
 x.valueOf(); // false
 
diff --git a/files/ko/web/javascript/reference/global_objects/date/now/index.html b/files/ko/web/javascript/reference/global_objects/date/now/index.html index b62f52e65e..1cba5e0571 100644 --- a/files/ko/web/javascript/reference/global_objects/date/now/index.html +++ b/files/ko/web/javascript/reference/global_objects/date/now/index.html @@ -19,7 +19,7 @@ browser-compat: javascript.builtins.Date.now

문법

-
var timeInMs = Date.now();
+
var timeInMs = Date.now();

반환 값

@@ -35,7 +35,7 @@ browser-compat: javascript.builtins.Date.now

이 메소드는 ECMA-262 5판에서 표준화되었습니다. 아직 이 메소드를 지원하도록 갱신되지 않은 엔진들은 이 메소드의 미지원에 대한 차선책으로 다음 코드를 활용하실 수 있습니다.

-
if (!Date.now) {
+
if (!Date.now) {
   Date.now = function now() {
     return new Date().getTime();
   };
@@ -50,7 +50,7 @@ browser-compat: javascript.builtins.Date.now
 

타이밍 공격 및 핑거 프린팅에 대한 보호를 제공하기 위해 Date.now ()의 정밀도는 브라우저 설정에 따라 반올림 될 수 있습니다.
Firefox에서는 privacy.reduceTimerPrecision 기본 설정이 기본적으로 활성화되어 있으며 Firefox 59에서는 기본값이 20µs입니다. 60 분에는 2ms가됩니다.

-
// Firefox 60에서 시간 정밀도 (2ms) 감소
+
// Firefox 60에서 시간 정밀도 (2ms) 감소
 Date.now();
 // 1519211809934
 // 1519211810362
diff --git a/files/ko/web/javascript/reference/global_objects/eval/index.html b/files/ko/web/javascript/reference/global_objects/eval/index.html
index 52ec8665e2..d599cadbe9 100644
--- a/files/ko/web/javascript/reference/global_objects/eval/index.html
+++ b/files/ko/web/javascript/reference/global_objects/eval/index.html
@@ -19,7 +19,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/eval
 
 

구문

-
eval(string)
+
eval(string)

매개변수

@@ -42,19 +42,19 @@ translation_of: Web/JavaScript/Reference/Global_Objects/eval

eval()의 인자가 문자열이 아니면 eval()은 인자를 그대로 반환합니다. 다음 예시에서, String 생성자가 명시된 경우 문자열을 계산하는 대신 String 객체를 반환합니다.

-
eval(new String("2 + 2")); // "2 + 2"를 포함한 String 객체를 반환
+
eval(new String("2 + 2")); // "2 + 2"를 포함한 String 객체를 반환
 eval("2 + 2");             // 4를 반환
 

toString()을 사용하는 일반적인 방식으로 제약을 피할 수 있습니다.

-
var expression = new String("2 + 2");
+
var expression = new String("2 + 2");
 eval(expression.toString());            // 4를 반환
 

eval을 직접 호출하지 않고 참조를 통해 간접적으로 사용한다면 ECMAScript 5부터는 지역 범위가 아니라 전역 범위에서 동작합니다. 예를 들어 eval()로 함수를 선언하면 전역 함수가 되고, 실행되는 코드는 실행되는 위치의 지역 범위에 접근할 수 없습니다.

-
function test() {
+
function test() {
   var x = 2, y = 4;
   console.log(eval('x + y'));  // 직접 호출, 지역 범위 사용, 결과값은 6
   var geval = eval; // eval을 전역 범위로 호출하는 것과 같음
diff --git a/files/ko/web/javascript/reference/global_objects/isfinite/index.html b/files/ko/web/javascript/reference/global_objects/isfinite/index.html
index 834389e2f7..257f22cf80 100644
--- a/files/ko/web/javascript/reference/global_objects/isfinite/index.html
+++ b/files/ko/web/javascript/reference/global_objects/isfinite/index.html
@@ -16,7 +16,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/isFinite
 
 

구문

-
isFinite(testValue)
+
isFinite(testValue)

매개변수

@@ -39,7 +39,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/isFinite

isFinite() 사용하기

-
isFinite(Infinity);  // false
+
isFinite(Infinity);  // false
 isFinite(NaN);       // false
 isFinite(-Infinity); // false
 
diff --git a/files/ko/web/javascript/reference/global_objects/json/stringify/index.html b/files/ko/web/javascript/reference/global_objects/json/stringify/index.html
index 12de82705b..e9b9f8667f 100644
--- a/files/ko/web/javascript/reference/global_objects/json/stringify/index.html
+++ b/files/ko/web/javascript/reference/global_objects/json/stringify/index.html
@@ -18,7 +18,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/JSON/stringify
 
 

구문

-
JSON.stringify(value[, replacer[, space]])
+
JSON.stringify(value[, replacer[, space]])

매개변수

@@ -54,7 +54,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/JSON/stringify
  • 열거 불가능한 속성들은 무시된다.
  • -
    JSON.stringify({});                  // '{}'
    +
    JSON.stringify({});                  // '{}'
     JSON.stringify(true);                // 'true'
     JSON.stringify('foo');               // '"foo"'
     JSON.stringify([1, 'false', false]); // '[1,"false",false]'
    @@ -104,7 +104,7 @@ JSON.stringify( Object.create(null, { x: { value: 'x', enumerable: false }, y: {
     
     

    함수에 대한 예제

    -
    function replacer(key, value) {
    +
    function replacer(key, value) {
       if (typeof value === "string") {
         return undefined;
       }
    @@ -121,7 +121,7 @@ var jsonString = JSON.stringify(foo, replacer);
     
     

    replacer 가 배열인 경우, 그 배열의 값은 JSON 문자열의 결과에 포함되는 속성의 이름을 나타낸다.

    -
    JSON.stringify(foo, ['week', 'month']);
    +
    JSON.stringify(foo, ['week', 'month']);
     // '{"week":45,"month":7}', 단지 "week" 와 "month" 속성을 포함한다
     
    @@ -129,7 +129,7 @@ var jsonString = JSON.stringify(foo, replacer);

    space 매개변수는 최종 문자열의 간격을 제어한다. 숫자일 경우 최대 10자 만큼의 공백 문자 크기로 들여쓰기되며, 문자열인 경우 해당 문자열 또는 처음 10자 만큼 들여쓰기 된다.

    -
    JSON.stringify({ a: 2 }, null, ' ');
    +
    JSON.stringify({ a: 2 }, null, ' ');
     // '{
     //  "a": 2
     // }'
    @@ -137,7 +137,7 @@ var jsonString = JSON.stringify(foo, replacer);
     
     

    '\t'를 사용하면 일반적으로 들여쓰기 된 코드스타일과 유사함.

    -
    JSON.stringify({ uno: 1, dos: 2 }, null, '\t');
    +
    JSON.stringify({ uno: 1, dos: 2 }, null, '\t');
     // returns the string:
     // '{
     //     "uno": 1,
    @@ -149,7 +149,7 @@ var jsonString = JSON.stringify(foo, replacer);
     
     

    If an object being stringified has a property named toJSON whose value is a function, then the toJSON() method customizes JSON stringification behavior: instead of the object being serialized, the value returned by the toJSON() method when called will be serialized. For example:

    -
    var obj = {
    +
    var obj = {
       foo: 'foo',
       toJSON: function() {
         return 'bar';
    @@ -167,7 +167,7 @@ JSON.stringify({ x: obj }); // '{"x":"bar"}'
     

    Functions are not a valid JSON data type so they will not work. However, they can be displayed if first converted to a string (e.g. in the replacer), via the function's toString method. Also, some objects like {{jsxref("Date")}} will be a string after {{jsxref("JSON.parse()")}}.

    -
    // Creating an example of JSON
    +
    // Creating an example of JSON
     var session = {
       'screens': [],
       'state': true
    diff --git a/files/ko/web/javascript/reference/global_objects/math/max/index.html b/files/ko/web/javascript/reference/global_objects/math/max/index.html
    index a70a5bf744..439aebe905 100644
    --- a/files/ko/web/javascript/reference/global_objects/math/max/index.html
    +++ b/files/ko/web/javascript/reference/global_objects/math/max/index.html
    @@ -55,7 +55,7 @@ browser-compat: javascript.builtins.Math.max
     
     

    Math.max()함수 사용하기

    -
    Math.max(10, 20);   //  20
    +
    Math.max(10, 20);   //  20
     Math.max(-10, -20); // -10
     Math.max(-10, 20);  //  20
     
    @@ -77,7 +77,7 @@ var max = arr.reduce(function(a, b) { Math.max(1, 2, 3)와 동일하지만 프로그래밍 방식으로 생성 된 모든 크기의 배열에서 getMaxOfArray()를 사용할 수 있습니다.

    -
    function getMaxOfArray(numArray) {
    +
    function getMaxOfArray(numArray) {
       return Math.max.apply(null, numArray);
     }
     
    @@ -92,7 +92,7 @@ var max = arr.reduce(function(a, b) {

    또한 {{jsxref("Operators/Spread_syntax", "spread operator")}}이 함수를 사용하면 배열의 숫자들 중 가장 큰 숫자를 쉽게 얻을 수 있습니다.

    -
    var arr = [1, 2, 3];
    +
    var arr = [1, 2, 3];
     var max = Math.max(...arr);
     
    diff --git a/files/ko/web/javascript/reference/global_objects/number/positive_infinity/index.html b/files/ko/web/javascript/reference/global_objects/number/positive_infinity/index.html index a9aacad926..8df934febf 100644 --- a/files/ko/web/javascript/reference/global_objects/number/positive_infinity/index.html +++ b/files/ko/web/javascript/reference/global_objects/number/positive_infinity/index.html @@ -46,7 +46,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Number/POSITIVE_INFINITY

    다음 코드에서 smallNumber는 JavaScript의 최댓값보다 큰 값을 할당받습니다. {{jsxref("Statements/if...else", "if")}} 문이 실행되면, bigNumber의 값이 Infinity이므로 bigNumber는 계산에 좀 더 적합한 유한값을 다시 할당합니다.

    -
    var bigNumber = (Number.MAX_VALUE) * 2;
    +
    var bigNumber = (Number.MAX_VALUE) * 2;
     
     if (bigNumber === Number.POSITIVE_INFINITY) {
       bigNumber = returnFinite();
    diff --git a/files/ko/web/javascript/reference/global_objects/object/valueof/index.html b/files/ko/web/javascript/reference/global_objects/object/valueof/index.html
    index cb8e14c16d..4d291a8115 100644
    --- a/files/ko/web/javascript/reference/global_objects/object/valueof/index.html
    +++ b/files/ko/web/javascript/reference/global_objects/object/valueof/index.html
    @@ -19,7 +19,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Object/valueOf
     
     

    구문

    -
    object.valueOf()
    +
    object.valueOf()

    반환 값

    @@ -43,13 +43,13 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Object/valueOf

    MyNumberType이라는 객체 형태가 존재하고, 이 객체의 valueOf 메서드를 만들고 싶다고 가정하겠습니다. 다음의 코드는 객체의 valueOf 메서드에 사용자 정의 함수를 할당합니다.

    -
    MyNumberType.prototype.valueOf = function() { return customPrimitiveValue; };
    +
    MyNumberType.prototype.valueOf = function() { return customPrimitiveValue; };

    위의 코드가 활성화된 상태에서 어떤 MyNumberType 객체를 원시 값으로 표현해야 하면 JavaScript가 자동으로 저 함수를 실행합니다.

    이 객체의 valueOf 메서드는 보통 JavaScript가 호출하겠지만 다음처럼 직접 호출할 수도 있습니다.

    -
    myNumberType.valueOf()
    +
    myNumberType.valueOf()

    참고: 문자열 문맥에서 객체-문자열 변환은 {{jsxref("Object.toString", "toString()")}} 메서드를 사용하며, {{jsxref("String")}} 객체의 valueOf를 사용해 원시 문자열로 변환하는 것과는 다릅니다. 모든 객체는, 비록 결과가 "[object type]" 뿐이라도 문자열 변환 기능을 가지고 있습니다. 그러나 대다수의 객체는 숫자, 불리언, 함수 등으로 변환되지 않습니다.

    @@ -59,7 +59,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Object/valueOf

    커스텀 타입에 valueOf 사용하기

    -
    function MyNumberType(n) {
    +
    function MyNumberType(n) {
         this.number = n;
     }
     
    @@ -72,7 +72,7 @@ myObj + 3; // 7

    단항 더하기 사용하기

    -
    +"5" // 5 (string to number)
    +
    +"5" // 5 (string to number)
     +"" // 0 (string to number)
     +"1 + 2" // NaN (doesn't evaluate)
     +new Date() // same as (new Date()).getTime()
    diff --git a/files/ko/web/javascript/reference/global_objects/reflect/index.html b/files/ko/web/javascript/reference/global_objects/reflect/index.html
    index 728dcd74c3..c44a9190f3 100644
    --- a/files/ko/web/javascript/reference/global_objects/reflect/index.html
    +++ b/files/ko/web/javascript/reference/global_objects/reflect/index.html
    @@ -68,7 +68,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Reflect
     
     

    객체가 특정 속성을 가지고 있는지 검사하기

    -
    const duck = {
    +
    const duck = {
       name: 'Maurice',
       color: 'white',
       greeting: function() {
    @@ -83,12 +83,12 @@ Reflect.has(duck, 'haircut');
     
     

    객체 자체 키를 반환하기

    -
    Reflect.ownKeys(duck);
    +
    Reflect.ownKeys(duck);
     // [ "name", "color", "greeting" ]

    객체에 새로운 속성 추가하기

    -
    Reflect.set(duck, 'eyes', 'black');
    +
    Reflect.set(duck, 'eyes', 'black');
     // returns "true" if successful
     // "duck" now contains the property "eyes: 'black'"
    -- cgit v1.2.3-54-g00ecf