Skip to content

Commit

Permalink
Editorial: Store ToString(𝔽(k)) in a variable for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
yossydev committed Feb 4, 2025
1 parent 810a33f commit ae16f29
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.formatOnSave": false
}
10 changes: 6 additions & 4 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -41149,9 +41149,10 @@ <h1>%TypedArray%.prototype.indexOf ( _searchElement_ [ , _fromIndex_ ] )</h1>
1. Let _k_ be _len_ + _n_.
1. If _k_ &lt; 0, set _k_ to 0.
1. Repeat, while _k_ &lt; _len_,
1. Let _kPresent_ be ! HasProperty(_O_, ! ToString(𝔽(_k_))).
1. Let _Pk_ be ! ToString(𝔽(_k_)).
1. Let _kPresent_ be ! HasProperty(_O_, _Pk_).
1. If _kPresent_ is *true*, then
1. Let _elementK_ be ! Get(_O_, ! ToString(𝔽(_k_))).
1. Let _elementK_ be ! Get(_O_, _Pk_).
1. If IsStrictlyEqual(_searchElement_, _elementK_) is *true*, return 𝔽(_k_).
1. Set _k_ to _k_ + 1.
1. Return *-1*<sub>𝔽</sub>.
Expand Down Expand Up @@ -41209,9 +41210,10 @@ <h1>%TypedArray%.prototype.lastIndexOf ( _searchElement_ [ , _fromIndex_ ] )</h1
1. Else,
1. Let _k_ be _len_ + _n_.
1. Repeat, while _k_ β‰₯ 0,
1. Let _kPresent_ be ! HasProperty(_O_, ! ToString(𝔽(_k_))).
1. Let _Pk_ be ! ToString(𝔽(_k_)).
1. Let _kPresent_ be ! HasProperty(_O_, _Pk_).
1. If _kPresent_ is *true*, then
1. Let _elementK_ be ! Get(_O_, ! ToString(𝔽(_k_))).
1. Let _elementK_ be ! Get(_O_, _Pk_).
1. If IsStrictlyEqual(_searchElement_, _elementK_) is *true*, return 𝔽(_k_).
1. Set _k_ to _k_ - 1.
1. Return *-1*<sub>𝔽</sub>.
Expand Down

0 comments on commit ae16f29

Please sign in to comment.