@@ -411,7 +411,7 @@ class ProductSearchClient {
411411 * client.listProducts({parent: formattedParent})
412412 * .then(responses => {
413413 * const resources = responses[0];
414- * for (let i = 0; i < resources.length; i += 1 ) {
414+ * for (const resource of resources) {
415415 * // doThingsWith(resources[i])
416416 * }
417417 * })
@@ -431,7 +431,7 @@ class ProductSearchClient {
431431 * const nextRequest = responses[1];
432432 * // The actual response object, if necessary.
433433 * // const rawResponse = responses[2];
434- * for (let i = 0; i < resources.length; i += 1 ) {
434+ * for (const resource of resources) {
435435 * // doThingsWith(resources[i]);
436436 * }
437437 * if (nextRequest) {
@@ -745,7 +745,7 @@ class ProductSearchClient {
745745 * client.listReferenceImages({parent: formattedParent})
746746 * .then(responses => {
747747 * const resources = responses[0];
748- * for (let i = 0; i < resources.length; i += 1 ) {
748+ * for (const resource of resources) {
749749 * // doThingsWith(resources[i])
750750 * }
751751 * })
@@ -765,7 +765,7 @@ class ProductSearchClient {
765765 * const nextRequest = responses[1];
766766 * // The actual response object, if necessary.
767767 * // const rawResponse = responses[2];
768- * for (let i = 0; i < resources.length; i += 1 ) {
768+ * for (const resource of resources) {
769769 * // doThingsWith(resources[i]);
770770 * }
771771 * if (nextRequest) {
@@ -1159,7 +1159,7 @@ class ProductSearchClient {
11591159 * client.listProductSets({parent: formattedParent})
11601160 * .then(responses => {
11611161 * const resources = responses[0];
1162- * for (let i = 0; i < resources.length; i += 1 ) {
1162+ * for (const resource of resources) {
11631163 * // doThingsWith(resources[i])
11641164 * }
11651165 * })
@@ -1179,7 +1179,7 @@ class ProductSearchClient {
11791179 * const nextRequest = responses[1];
11801180 * // The actual response object, if necessary.
11811181 * // const rawResponse = responses[2];
1182- * for (let i = 0; i < resources.length; i += 1 ) {
1182+ * for (const resource of resources) {
11831183 * // doThingsWith(resources[i]);
11841184 * }
11851185 * if (nextRequest) {
@@ -1603,7 +1603,7 @@ class ProductSearchClient {
16031603 * client.listProductsInProductSet({name: formattedName})
16041604 * .then(responses => {
16051605 * const resources = responses[0];
1606- * for (let i = 0; i < resources.length; i += 1 ) {
1606+ * for (const resource of resources) {
16071607 * // doThingsWith(resources[i])
16081608 * }
16091609 * })
@@ -1623,7 +1623,7 @@ class ProductSearchClient {
16231623 * const nextRequest = responses[1];
16241624 * // The actual response object, if necessary.
16251625 * // const rawResponse = responses[2];
1626- * for (let i = 0; i < resources.length; i += 1 ) {
1626+ * for (const resource of resources) {
16271627 * // doThingsWith(resources[i]);
16281628 * }
16291629 * if (nextRequest) {
@@ -1761,20 +1761,14 @@ class ProductSearchClient {
17611761 * // Handle the operation using the promise pattern.
17621762 * client.importProductSets(request)
17631763 * .then(responses => {
1764- * const operation = responses[0];
1765- * const initialApiResponse = responses[1];
1764+ * const [operation, initialApiResponse] = responses;
17661765 *
17671766 * // Operation#promise starts polling for the completion of the LRO.
17681767 * return operation.promise();
17691768 * })
17701769 * .then(responses => {
1771- * // The final result of the operation.
17721770 * const result = responses[0];
1773- *
1774- * // The metadata value of the completed operation.
17751771 * const metadata = responses[1];
1776- *
1777- * // The response of the api call returning the complete operation.
17781772 * const finalApiResponse = responses[2];
17791773 * })
17801774 * .catch(err => {
@@ -1791,8 +1785,7 @@ class ProductSearchClient {
17911785 * // Handle the operation using the event emitter pattern.
17921786 * client.importProductSets(request)
17931787 * .then(responses => {
1794- * const operation = responses[0];
1795- * const initialApiResponse = responses[1];
1788+ * const [operation, initialApiResponse] = responses;
17961789 *
17971790 * // Adding a listener for the "complete" event starts polling for the
17981791 * // completion of the operation.
0 commit comments