From 980fe00a74a9ad013b945755415ace2e5429c3c2 Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Wed, 27 Oct 2021 02:31:24 +0300 Subject: [RU] Remove notranslate (#2874) --- files/ru/web/javascript/reference/operators/yield/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'files/ru/web/javascript/reference/operators/yield/index.html') diff --git a/files/ru/web/javascript/reference/operators/yield/index.html b/files/ru/web/javascript/reference/operators/yield/index.html index d30b1bbce5..34f3245f4d 100644 --- a/files/ru/web/javascript/reference/operators/yield/index.html +++ b/files/ru/web/javascript/reference/operators/yield/index.html @@ -18,7 +18,7 @@ translation_of: Web/JavaScript/Reference/Operators/yield

Синтаксис

-
 [rv] = yield [[выражение]];
+
 [rv] = yield [[выражение]];
выражение
@@ -39,7 +39,7 @@ translation_of: Web/JavaScript/Reference/Operators/yield

Следующий фрагмент кода содержит определение функции-генератора и вспомогательной функции:

-
function* foo(){
+
function* foo(){
   var index = 0;
   while(index <= 2) // при достижении 2, done в yield станет true, а value undefined;
     yield index++;
@@ -47,7 +47,7 @@ translation_of: Web/JavaScript/Reference/Operators/yield
 
 

После того как тело функции-генератора определено, оно может использоваться для получения итератора:

-
var iterator = foo();
+
var iterator = foo();
 console.log(iterator.next()); // { value:0, done:false }
 console.log(iterator.next()); // { value:1, done:false }
 console.log(iterator.next()); // { value:2, done:false }
-- 
cgit v1.2.3-54-g00ecf