mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2026-02-28 01:58:28 +08:00
语法高亮,滚动条美化,设置页面调整
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
<h2 id="概要">概要</h2>
|
||||
<p><strong><code>Uint32Array</code></strong>表示一个由基于平台字节序的32位无符号字节组成的数组.如果需要对字节顺序进行控制(译者注:即 littleEndian 或 bigEndian),请使用<a href="Reference/Global_Objects/DataView" title="DataView 视图是一个可以从 ArrayBuffer 对象中读写多种数值类型的底层接口,在读写时不用考虑平台字节序问题。"><code>DataView</code></a>代替.数组中每个元素的初始值都是0.一旦创建,你可以用对象的方法引用数组里的元素,或者使用标准的数组索引语法(即,使用中括号)。</p>
|
||||
<h2 id="语法">语法</h2>
|
||||
<pre class="syntaxbox">new Uint32Array(); // new in ES2017
|
||||
<pre><code class="language-javascript">new Uint32Array(); // new in ES2017
|
||||
new Uint32Array(length);
|
||||
new Uint32Array(typedArray);
|
||||
new Uint32Array(object);
|
||||
new Uint32Array(buffer [, byteOffset [, length]]);</pre>
|
||||
new Uint32Array(buffer [, byteOffset [, length]]);</code></pre>
|
||||
<p>更多的构造器语法和属性请参照 <em><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#Syntax">TypedArray</a>。</em></p>
|
||||
<h2 id="属性">属性</h2>
|
||||
<dl>
|
||||
@@ -54,7 +54,7 @@ new Uint32Array(buffer [, byteOffset [, length]]);</pre>
|
||||
<dd>Returns a new <code>Uint32Array</code> from the given start and end element index.</dd>
|
||||
</dl>
|
||||
<h2 id="Examples">Examples</h2>
|
||||
<pre class="brush: js">// From a length
|
||||
<pre><code class="language-javascript">// From a length
|
||||
var uint32 = new Uint32Array(2);
|
||||
uint32[0] = 42;
|
||||
console.log(uint32[0]); // 42
|
||||
@@ -73,7 +73,7 @@ console.log(y[0]); // 21
|
||||
// From an ArrayBuffer
|
||||
var buffer = new ArrayBuffer(16);
|
||||
var z = Uint32Array(buffer, 0, 4);
|
||||
</pre>
|
||||
</code></pre>
|
||||
<h2 id="Specifications">Specifications</h2>
|
||||
<table class="standard-table">
|
||||
<tbody>
|
||||
|
||||
Reference in New Issue
Block a user