You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>This method converts the values of the iterator to Strings, and then concatenates these Strings, separated by occurrences of the _separator_. If no separator is provided, a single comma is used as the separator.</p>
17
17
<p>It performs the following steps when called:</p>
18
18
<emu-alg>
19
-
1. Let _O_ be the *this* value.
20
-
1. If _O_ is not an Object, throw a *TypeError* exception.
21
-
1. Let _iterated_ be the Iterator Record { [[Iterator]]: _O_, [[NextMethod]]: *undefined*, [[Done]]: *false* }.
19
+
1. Let _obj_ be the *this* value.
20
+
1. If _obj_ is not an Object, throw a *TypeError* exception.
21
+
1. Let _iterated_ be the Iterator Record { [[Iterator]]: _obj_, [[NextMethod]]: *undefined*, [[Done]]: *false* }.
22
22
1. If _separator_ is *undefined*, then
23
23
1. Let _sep_ be *","*.
24
24
1. Else,
25
25
1. Let _sep_ be Completion(ToString(_separator_)).
26
26
1. IfAbruptCloseIterator(_sep_, _iterated_).
27
-
1. Set _iterated_ to ? GetIteratorDirect(_O_).
28
-
1. Let _R_ be the empty String.
27
+
1. Set _iterated_ to ? GetIteratorDirect(_obj_).
28
+
1. Let _result_ be the empty String.
29
29
1. Let _first_ be *true*.
30
30
1. Repeat,
31
31
1. Let _value_ be ? IteratorStepValue(_iterated_).
32
-
1. If _value_ is ~done~, return _R_.
32
+
1. If _value_ is ~done~, return _result_.
33
33
1. If _first_ is *true*, then
34
34
1. Set _first_ to *false*.
35
35
1. Else,
36
-
1. Set _R_ to the string-concatenation of _R_ and _sep_.
36
+
1. Set _result_ to the string-concatenation of _result_ and _sep_.
37
37
1. If _value_ is neither *undefined* nor *null*, then
38
-
1. Let _S_ be Completion(ToString(_value_)).
39
-
1. IfAbruptCloseIterator(_S_, _iterated_).
40
-
1. Set _R_ to the string-concatenation of _R_ and _S_.
38
+
1. Let _valueString_ be Completion(ToString(_value_)).
0 commit comments