aboutsummaryrefslogtreecommitdiff
path: root/files/vi/glossary/boolean/index.html
diff options
context:
space:
mode:
authorFlorian Dieminger <me@fiji-flo.de>2021-02-11 18:29:28 +0100
committerGitHub <noreply@github.com>2021-02-11 18:29:28 +0100
commit964decad361766e85d928a56f0ab80af0e75c172 (patch)
tree64e802be7fd6e93243b93f5813fe7ae2873ac1b3 /files/vi/glossary/boolean/index.html
parent890776270440331dcd24d34dc5e1cef2167aa70a (diff)
parent9201e4212c57af09becda69f17c17a3a34f226c2 (diff)
downloadtranslated-content-964decad361766e85d928a56f0ab80af0e75c172.tar.gz
translated-content-964decad361766e85d928a56f0ab80af0e75c172.tar.bz2
translated-content-964decad361766e85d928a56f0ab80af0e75c172.zip
Merge pull request #61 from fiji-flo/unslugging-vi
Unslugging vi
Diffstat (limited to 'files/vi/glossary/boolean/index.html')
-rw-r--r--files/vi/glossary/boolean/index.html54
1 files changed, 54 insertions, 0 deletions
diff --git a/files/vi/glossary/boolean/index.html b/files/vi/glossary/boolean/index.html
new file mode 100644
index 0000000000..2800146bfd
--- /dev/null
+++ b/files/vi/glossary/boolean/index.html
@@ -0,0 +1,54 @@
+---
+title: Boolean
+slug: Glossary/Boolean
+tags:
+ - Boolean
+ - JavaScript
+ - Loại dữ liệu
+ - Ngôn ngữ lập trình
+ - Thuật ngữ
+translation_of: Glossary/Boolean
+original_slug: Tu-dien-thuat-ngu/Boolean
+---
+<p>Trong khoa học máy tính, Boolean (phiên âm /bu-li-ờn/) là loại dữ liệu logic chỉ có giá trị <code>true</code>/đúng hoặc <code>false</code>/sai. Ví dụ, trong JavaScript, điều kiện Boolean thường sử dụng để quyết định đoạn mã nào được thực thi (như trong {{jsxref("Statements/if...else", "lệnh if")}}) hay lặp lại (trong {{jsxref("Statements/for", "vòng lặp for")}}).</p>
+
+<p>Dưới đây là vài đoạn mã JavaScript giả (không hẳng là mã chạy được) để minh họa khái niệm này.</p>
+
+<pre class="brush: js">/* Lệnh if của JavaScript */
+if (điều kiện <em>boolean</em>) {
+ // Mã được thực thi nếu điều kiện là đúng
+}
+
+if (điều kiện <em>boolean</em>) {
+ console.log("điều kiện <em>boolean</em> resolved to true");
+} else {
+ console.log("boolean conditional resolved to false");
+}
+
+
+/* JavaScript for loop */
+for (<em>biến điều khiển</em>; điều kiện <em>boolean</em>; <em>bộ đếm</em>) {
+ // Mã được thực thi nếu điều kiện là đúng
+}
+
+for (var i=0; i &lt; 4; i++) {
+ console.log("Tôi chỉ được in ra khi điều kiện <em>boolean là đúng/true</em>");
+}
+</pre>
+
+<p>Giá trị Boolean được đặt tên theo nhà toán học người Anh {{interwiki("wikipedia", "George Boole")}}, ông tổ ngành toán học logic. </p>
+
+<h2 id="Tìm_hiểu_thêm">Tìm hiểu thêm</h2>
+
+<h3 id="Kiến_thức_phổ_thông">Kiến thức phổ thông</h3>
+
+<ul>
+ <li>{{Interwiki("wikipedia", "Boolean data type", "Boolean")}} trên Wikipedia</li>
+</ul>
+
+<h3 id="Tài_liệu_tham_khảo_kỹ_thuật">Tài liệu tham khảo kỹ thuật</h3>
+
+<ul>
+ <li>Đối tượng global JavaScript: {{jsxref("Boolean")}}</li>
+ <li><a href="/en-US/docs/Web/JavaScript/Data_structures">Loại dữ liệu và cấu trúc dữ liệu trong JavaScript</a></li>
+</ul>