Skip to content

Commit

Permalink
Editorial: replace "and let"/"and return" with better phrasing (#2137)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra authored and ljharb committed Sep 10, 2020
1 parent 6681ce7 commit faaf157
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -18053,7 +18053,8 @@ <h1>%ForInIteratorPrototype%.next ( )</h1>
1. Append _key_ to _remaining_.
1. Set _O_.[[ObjectWasVisited]] to *true*.
1. Repeat, while _remaining_ is not empty,
1. Remove the first element from _remaining_ and let _r_ be the value of the element.
1. Let _r_ be the first element of _remaining_.
1. Remove the first element from _remaining_.
1. If there does not exist an element _v_ of _visited_ such that SameValue(_r_, _v_) is *true*, then
1. Let _desc_ be ? _object_.[[GetOwnProperty]](_r_).
1. If _desc_ is not *undefined*, then
Expand Down Expand Up @@ -27218,7 +27219,8 @@ <h1>Number.prototype.toExponential ( _fractionDigits_ )</h1>
1. [id="step-number-proto-toexponential-intermediate-values"] Let _e_, _n_, and _f_ be integers such that _f_ &ge; 0, 10<sup>_f_</sup> &le; _n_ &lt; 10<sup>_f_ + 1</sup>, the Number value for ℝ(_n_) &times; 10<sub>ℝ</sub><sup>ℝ(_e_) - ℝ(_f_)</sup> is _x_, and _f_ is as small as possible. Note that the decimal representation of _n_ has _f_ + 1<sub>ℝ</sub> digits, _n_ is not divisible by 10, and the least significant digit of _n_ is not necessarily uniquely determined by these criteria.
1. Let _m_ be the String value consisting of the digits of the decimal representation of _n_ (in order, with no leading zeroes).
1. If _f_ &ne; 0, then
1. Let _a_ be the first code unit of _m_, and let _b_ be the remaining _f_ code units of _m_.
1. Let _a_ be the first code unit of _m_.
1. Let _b_ be the other _f_ code units of _m_.
1. Set _m_ to the string-concatenation of _a_, *"."*, and _b_.
1. If _e_ = 0, then
1. Let _c_ be *"+"*.
Expand Down Expand Up @@ -27268,7 +27270,8 @@ <h1>Number.prototype.toFixed ( _fractionDigits_ )</h1>
1. Let _z_ be the String value consisting of _f_ + 1 - _k_ occurrences of the code unit 0x0030 (DIGIT ZERO).
1. Set _m_ to the string-concatenation of _z_ and _m_.
1. Set _k_ to _f_ + 1.
1. Let _a_ be the first _k_ - _f_ code units of _m_, and let _b_ be the remaining _f_ code units of _m_.
1. Let _a_ be the first _k_ - _f_ code units of _m_.
1. Let _b_ be the other _f_ code units of _m_.
1. Set _m_ to the string-concatenation of _a_, *"."*, and _b_.
1. Return the string-concatenation of _s_ and _m_.
</emu-alg>
Expand Down Expand Up @@ -27309,7 +27312,8 @@ <h1>Number.prototype.toPrecision ( _precision_ )</h1>
1. If _e_ &lt; -6 or _e_ &ge; _p_, then
1. Assert: _e_ &ne; 0.
1. If _p_ &ne; 1, then
1. Let _a_ be the first code unit of _m_, and let _b_ be the remaining _p_ - 1 code units of _m_.
1. Let _a_ be the first code unit of _m_.
1. Let _b_ be the other _p_ - 1 code units of _m_.
1. Set _m_ to the string-concatenation of _a_, *"."*, and _b_.
1. If _e_ &gt; 0, then
1. Let _c_ be the code unit 0x002B (PLUS SIGN).
Expand Down Expand Up @@ -39543,7 +39547,8 @@ <h1>AsyncGeneratorResolve ( _generator_, _value_, _done_ )</h1>
1. Assert: _generator_ is an AsyncGenerator instance.
1. Let _queue_ be _generator_.[[AsyncGeneratorQueue]].
1. Assert: _queue_ is not an empty List.
1. Remove the first element from _queue_ and let _next_ be the value of that element.
1. Let _next_ be the first element of _queue_.
1. Remove the first element from _queue_.
1. Let _promiseCapability_ be _next_.[[Capability]].
1. Let _iteratorResult_ be ! CreateIterResultObject(_value_, _done_).
1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, &laquo; _iteratorResult_ &raquo;).
Expand All @@ -39559,7 +39564,8 @@ <h1>AsyncGeneratorReject ( _generator_, _exception_ )</h1>
1. Assert: _generator_ is an AsyncGenerator instance.
1. Let _queue_ be _generator_.[[AsyncGeneratorQueue]].
1. Assert: _queue_ is not an empty List.
1. Remove the first element from _queue_ and let _next_ be the value of that element.
1. Let _next_ be the first element of _queue_.
1. Remove the first element from _queue_.
1. Let _promiseCapability_ be _next_.[[Capability]].
1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, &laquo; _exception_ &raquo;).
1. Perform ! AsyncGeneratorResumeNext(_generator_).
Expand Down

0 comments on commit faaf157

Please sign in to comment.