diff options
Diffstat (limited to 'files/vi/glossary/truthy/index.html')
-rw-r--r-- | files/vi/glossary/truthy/index.html | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/files/vi/glossary/truthy/index.html b/files/vi/glossary/truthy/index.html deleted file mode 100644 index db73ea562d..0000000000 --- a/files/vi/glossary/truthy/index.html +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: Truthy -slug: Glossary/Truthy -translation_of: Glossary/Truthy -original_slug: Tu-dien-thuat-ngu/Truthy ---- -<p>Trong {{Glossary("JavaScript")}}, <strong>truthy</strong> là giá trị được hiểu là <code>true</code> trong ngữ cảnh {{Glossary("Boolean")}}. Tất cả mọi giá trị đều là truthy, trừ phi chúng được định nghĩa là {{Glossary("Falsy", "falsy")}} (tức là, ngoại trừ <code>false</code>, <code>0</code>, <code>""</code>, <code>null</code>, <code>undefined</code>, và <code>NaN</code>).</p> - -<p>{{Glossary("JavaScript")}} dùng {{Glossary("Type_Conversion", "ép kiểu")}} trong ngữ cảnh Boolean.</p> - -<p>Ví dụ về giá trị <em>truthy</em> trong JavaScript (sẽ được ép kiểu thành true trong ngữ cảnh Boolean, và đương nhiên thực hiện mã nguồn trong khối <code>if</code>):</p> - -<pre class="brush: js">if (true) -if ({}) -if ([]) -if (42) -if ("foo") -if (new Date()) -if (-42) -if (3.14) -if (-3.14) -if (Infinity) -if (-Infinity) -</pre> - -<h2 id="Xem_thêm">Xem thêm</h2> - -<ul> - <li>{{Glossary("Falsy")}}</li> - <li>{{Glossary("Type_Conversion", "Ép kiểu")}}</li> - <li>{{Glossary("Boolean")}}</li> -</ul> - -<div>{{QuickLinksWithSubpages("/en-US/docs/Glossary")}}</div> |