From 50edfb6441d38010a5bc94f5e76d8a0c71745800 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Sat, 23 Oct 2021 00:12:19 +0900 Subject: Glossary/Truthy を変換準備 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/glossary/truthy/index.html | 55 ------------------------------------- files/ja/glossary/truthy/index.md | 55 +++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 55 deletions(-) delete mode 100644 files/ja/glossary/truthy/index.html create mode 100644 files/ja/glossary/truthy/index.md diff --git a/files/ja/glossary/truthy/index.html b/files/ja/glossary/truthy/index.html deleted file mode 100644 index 3d62da159f..0000000000 --- a/files/ja/glossary/truthy/index.html +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: Truthy -slug: Glossary/Truthy -tags: - - CodingScripting - - Glossary - - JavaScript - - 用語集 -translation_of: Glossary/Truthy ---- -

{{Glossary("JavaScript")}} において、 truthy は {{Glossary("Boolean")}} コンテキストに現れた時に true とみなされる値のことです。 {{Glossary("Falsy", "falsy")}} として定義された値 (つまり、false, 0, -0, 0n, "", null, undefined, NaN) を除くすべての値は truthy です。

- -

{{Glossary("JavaScript")}} は、 Boolean コンテキストでは{{Glossary("Type_Conversion", "型変換")}}を用います。

- -

JavaScript で truthy な値の例です (boolean コンテキストではこれらの値を true と評価し、if ブロックを実行します)。

- -
if (true)
-if ({})
-if ([])
-if (42)
-if ("0")
-if ("false")
-if (new Date())
-if (-42)
-if (12n)
-if (3.14)
-if (-3.14)
-if (Infinity)
-if (-Infinity)
-
- -

仕様書

- - - - - - - - - - - - -
仕様書
{{SpecName("ESDraft", "#sec-toboolean", "ToBoolean abstract operation")}}
- -

関連情報

- - - -
{{QuickLinksWithSubpages("/ja/docs/Glossary")}}
diff --git a/files/ja/glossary/truthy/index.md b/files/ja/glossary/truthy/index.md new file mode 100644 index 0000000000..3d62da159f --- /dev/null +++ b/files/ja/glossary/truthy/index.md @@ -0,0 +1,55 @@ +--- +title: Truthy +slug: Glossary/Truthy +tags: + - CodingScripting + - Glossary + - JavaScript + - 用語集 +translation_of: Glossary/Truthy +--- +

{{Glossary("JavaScript")}} において、 truthy は {{Glossary("Boolean")}} コンテキストに現れた時に true とみなされる値のことです。 {{Glossary("Falsy", "falsy")}} として定義された値 (つまり、false, 0, -0, 0n, "", null, undefined, NaN) を除くすべての値は truthy です。

+ +

{{Glossary("JavaScript")}} は、 Boolean コンテキストでは{{Glossary("Type_Conversion", "型変換")}}を用います。

+ +

JavaScript で truthy な値の例です (boolean コンテキストではこれらの値を true と評価し、if ブロックを実行します)。

+ +
if (true)
+if ({})
+if ([])
+if (42)
+if ("0")
+if ("false")
+if (new Date())
+if (-42)
+if (12n)
+if (3.14)
+if (-3.14)
+if (Infinity)
+if (-Infinity)
+
+ +

仕様書

+ + + + + + + + + + + + +
仕様書
{{SpecName("ESDraft", "#sec-toboolean", "ToBoolean abstract operation")}}
+ +

関連情報

+ + + +
{{QuickLinksWithSubpages("/ja/docs/Glossary")}}
-- cgit v1.2.3-54-g00ecf