Skip to content

Commit

Permalink
Minor clarity improvements (#6225)
Browse files Browse the repository at this point in the history
1. Reworded a sentence from "add" to "change", because new elements can't be added to Typed Arrays
2. Replaced `Array.prototype` with <code>*TypedArray*.prototype</code>, as this page is about the latter.
  • Loading branch information
fzs111 authored Jun 23, 2021
1 parent 75bf139 commit ffa6d4b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h2 id="Description">Description</h2>

<p>The <code>slice</code> method does not alter the original typed array, but instead returns a copy of a portion of the original typed array. As typed arrays only store primitive values, the copy the <code>slice</code> method returns is always a shallow copy.</p>

<p>If a new element is added to either typed array, the other typed array is not affected.
<p>If an element is changed in either typed array, the other typed array is not affected.
</p>

<h2 id="Examples">Examples</h2>
Expand Down Expand Up @@ -96,7 +96,7 @@ <h2 id="Polyfill">Polyfill</h2>

<p>If you need to support truly obsolete JavaScript engines that don't support
{{jsxref("Object.defineProperty")}}, it's best not to polyfill
<code>Array.prototype</code> methods at all, as you can't make them non-enumerable.</p>
<code><em>TypedArray</em>.prototype</code> methods at all, as you can't make them non-enumerable.</p>

<h2 id="Specifications">Specifications</h2>

Expand Down

0 comments on commit ffa6d4b

Please sign in to comment.