diff options
| author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:43:23 -0500 |
|---|---|---|
| committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:43:23 -0500 |
| commit | 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 (patch) | |
| tree | a9ef8ac1e1b8fe4207b6d64d3841bfb8990b6fd0 /files/vi/web/javascript/reference/global_objects/infinity | |
| parent | 074785cea106179cb3305637055ab0a009ca74f2 (diff) | |
| download | translated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.tar.gz translated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.tar.bz2 translated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.zip | |
initial commit
Diffstat (limited to 'files/vi/web/javascript/reference/global_objects/infinity')
| -rw-r--r-- | files/vi/web/javascript/reference/global_objects/infinity/index.html | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/files/vi/web/javascript/reference/global_objects/infinity/index.html b/files/vi/web/javascript/reference/global_objects/infinity/index.html new file mode 100644 index 0000000000..73e388b0d1 --- /dev/null +++ b/files/vi/web/javascript/reference/global_objects/infinity/index.html @@ -0,0 +1,81 @@ +--- +title: Infinity +slug: Web/JavaScript/Reference/Global_Objects/Infinity +translation_of: Web/JavaScript/Reference/Global_Objects/Infinity +--- +<div>{{jsSidebar("Objects")}}</div> + +<p>Thuộc tính global <code><strong>Infinity</strong></code> là giá trị kiểu số biểu diễn vô cùng.</p> + +<p>{{js_property_attributes(0,0,0)}}</p> + +<div>{{EmbedInteractiveExample("pages/js/globalprops-infinity.html")}}</div> + +<p class="hidden">Tài nguyên dùng cho bài viết này được lưu trữ trong một kho của GitHub. Nếu bạn muốn đóng góp cho nó, hãy clone lại <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> và gửi cho chúng tôi một pull request.</p> + +<h2 id="Cú_pháp">Cú pháp</h2> + +<pre class="syntaxbox"><code>Infinity </code></pre> + +<h2 id="Mô_tả">Mô tả</h2> + +<p><code>Infinity</code> là một thuộc tính của <em>global object</em>, hay nói các khác, là một biến trong global scope.</p> + +<p>Giá trị khởi đầu của <code>Infinity</code> là {{jsxref("Number.POSITIVE_INFINITY")}}. Giá trị <code>Infinity</code> (dương vô cùng) lớn hơn mọi số. Về mặt toán học, giá trị này có biểu hiện giống hệt với vô cùng; chẳng hạn, mọi số dương nhân với <code>Infinity</code> đều bằng <code>Infinity</code>, và mọi số chia cho <code>Infinity</code> đều bằng 0.</p> + +<p>Như đã định nghĩa trong bản đặc tả ECMAScript 5, <code>Infinity</code> là chỉ-đọc (cài đặt trong JavaScript 1.8.5 / Firefox 4).</p> + +<h2 id="Ví_dụ">Ví dụ</h2> + +<pre class="brush: js">console.log(Infinity ); /* Infinity */ +console.log(Infinity + 1 ); /* Infinity */ +console.log(Math.pow(10, 1000)); /* Infinity */ +console.log(Math.log(0) ); /* -Infinity */ +console.log(1 / Infinity ); /* 0 */ +</pre> + +<h2 id="Đặc_tả">Đặc tả</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Đặc tả</th> + <th scope="col">Trạng thái</th> + <th scope="col">Ghi chú</th> + </tr> + <tr> + <td>{{SpecName('ES1')}}</td> + <td>{{Spec2('ES1')}}</td> + <td>Định nghĩa lần đầu. Cài đặt trong JavaScript 1.3</td> + </tr> + <tr> + <td>{{SpecName('ES5.1', '#sec-15.1.1.2', 'Infinity')}}</td> + <td>{{Spec2('ES5.1')}}</td> + <td> </td> + </tr> + <tr> + <td>{{SpecName('ES6', '#sec-value-properties-of-the-global-object-infinity', 'Infinity')}}</td> + <td>{{Spec2('ES6')}}</td> + <td> </td> + </tr> + <tr> + <td>{{SpecName('ESDraft', '#sec-value-properties-of-the-global-object-infinity', 'Infinity')}}</td> + <td>{{Spec2('ESDraft')}}</td> + <td> </td> + </tr> + </tbody> +</table> + +<h2 id="Trình_duyệt_hỗ_trợ">Trình duyệt hỗ trợ</h2> + +<p class="hidden">Bảng trình duyệt hỗ trợ trong trang này được sinh từ cấu trúc dữ liệu. Nếu bạn muốn đóng góp cho khối dữ liệu, hãy xem qua <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> và gửi cho chúng tôi pull request.</p> + +<p>{{Compat("javascript.builtins.Infinity")}}</p> + +<h2 id="Xem_thêm">Xem thêm</h2> + +<ul> + <li>{{jsxref("Number.NEGATIVE_INFINITY")}}</li> + <li>{{jsxref("Number.POSITIVE_INFINITY")}}</li> + <li>{{jsxref("Number.isFinite")}}</li> +</ul> |
