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
* // Draw a row of circles using the original array.
217
+
* for (let i = 0; i < colors.length; i += 1) {
218
+
* // Calculate the x-coordinate.
219
+
* let x = (i + 1) * 12.5;
220
+
*
221
+
* // Style the circle.
222
+
* let c = colors[i];
223
+
* fill(c);
224
+
*
225
+
* // Draw the circle.
226
+
* circle(x, 33, 10);
227
+
* }
228
+
*
229
+
* // Draw a row of circles using the original array.
230
+
* for (let i = 0; i < shuffledColors.length; i += 1) {
231
+
* // Calculate the x-coordinate.
232
+
* let x = (i + 1) * 12.5;
233
+
*
234
+
* // Style the circle.
235
+
* let c = shuffledColors[i];
236
+
* fill(c);
237
+
*
238
+
* // Draw the circle.
239
+
* circle(x, 67, 10);
240
+
* }
241
+
*
242
+
* describe(
243
+
* 'Two rows of circles on a gray background. The top row follows the color sequence ROYGBIV. The bottom row has all the same colors but they are shuffled.'
244
+
* );
245
+
* }
246
+
* </code>
247
+
* </div>
248
+
*
249
+
* <div>
250
+
* <code>
196
251
* function setup() {
197
-
* let regularArr = ['ABC', 'def', createVector(), TAU, Math.E];
198
-
* print(regularArr);
199
-
* shuffle(regularArr, true); // force modifications to passed array
200
-
* print(regularArr);
201
-
*
202
-
* // By default shuffle() returns a shuffled cloned array:
0 commit comments