diff options
Diffstat (limited to 'files/uk/glossary/truthy/index.html')
| -rw-r--r-- | files/uk/glossary/truthy/index.html | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/files/uk/glossary/truthy/index.html b/files/uk/glossary/truthy/index.html deleted file mode 100644 index a89d30a922..0000000000 --- a/files/uk/glossary/truthy/index.html +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: Truthy -slug: Glossary/Truthy -tags: - - JavaScript - - Словник -translation_of: Glossary/Truthy ---- -<p><span class="seoSummary">У мові {{Glossary("JavaScript")}}, <strong>правдиве (truthy) </strong>значення - це значення, яке дорівнює <code>true</code> у контексті {{Glossary("Boolean")}}. Всі величини є правдивими, крім тих, які визначені як {{Glossary("Falsy", "хибні")}} (тобто, крім <code>false</code>, <code>0</code>, <code>-0</code>, <code>0n</code>, <code>""</code>, <code>null</code>, <code>undefined</code> та <code>NaN</code>).</span></p> - -<p>Мова {{Glossary("JavaScript")}} використовує неявне {{Glossary("Type_Conversion", "перетворення типів")}} у контексті Boolean.</p> - -<p>Приклади <em>правдивих </em>значень у JavaScript (які будуть неявно приведені до true у контексті boolean, і, таким чином, виконають блок <code>if</code>):</p> - -<pre class="brush: js notranslate">if (true) -if ({}) -if ([]) -if (42) -if ("0") -if (new Date()) -if (-42) -if (12n) -if (3.14) -if (-3.14) -if (Infinity) -if (-Infinity) -</pre> - -<h2 id="Специфікації">Специфікації</h2> - -<table> - <thead> - <tr> - <th scope="col"><strong>Специфікація</strong></th> - </tr> - </thead> - <tbody> - <tr> - <td>{{SpecName("ESDraft", "#sec-toboolean", "<code>ToBoolean</code> abstract operation")}}</td> - </tr> - </tbody> -</table> - -<h2 id="Див._також">Див. також</h2> - -<ul> - <li>{{Glossary("Falsy")}}</li> - <li>{{Glossary("Type_Conversion", "Приведення")}}</li> - <li>{{Glossary("Boolean")}}</li> -</ul> - -<div>{{QuickLinksWithSubpages("/uk/docs/Glossary")}}</div> |
