aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/javascript/reference/statements/async_function/index.html
diff options
context:
space:
mode:
authorAlexey Pyltsyn <lex61rus@gmail.com>2021-10-27 02:31:24 +0300
committerGitHub <noreply@github.com>2021-10-27 02:31:24 +0300
commit980fe00a74a9ad013b945755415ace2e5429c3c2 (patch)
treea1c6bb4b302e69bfa53eab13e44500eba55d1696 /files/ru/web/javascript/reference/statements/async_function/index.html
parent374a039b97a11ee7306539d16aaab27fed66b398 (diff)
downloadtranslated-content-980fe00a74a9ad013b945755415ace2e5429c3c2.tar.gz
translated-content-980fe00a74a9ad013b945755415ace2e5429c3c2.tar.bz2
translated-content-980fe00a74a9ad013b945755415ace2e5429c3c2.zip
[RU] Remove notranslate (#2874)
Diffstat (limited to 'files/ru/web/javascript/reference/statements/async_function/index.html')
-rw-r--r--files/ru/web/javascript/reference/statements/async_function/index.html10
1 files changed, 5 insertions, 5 deletions
diff --git a/files/ru/web/javascript/reference/statements/async_function/index.html b/files/ru/web/javascript/reference/statements/async_function/index.html
index 7e07f940cf..d46b1039e3 100644
--- a/files/ru/web/javascript/reference/statements/async_function/index.html
+++ b/files/ru/web/javascript/reference/statements/async_function/index.html
@@ -13,7 +13,7 @@ translation_of: Web/JavaScript/Reference/Statements/async_function
<h2 id="Синтаксис">Синтаксис</h2>
-<pre class="syntaxbox notranslate">async function <em>name</em>([<em>param</em>[, <em>param</em>[, ... <em>param</em>]]]) {
+<pre class="syntaxbox">async function <em>name</em>([<em>param</em>[, <em>param</em>[, ... <em>param</em>]]]) {
<em>statements</em>
}
</pre>
@@ -49,7 +49,7 @@ translation_of: Web/JavaScript/Reference/Statements/async_function
<h3 id="Простой_пример">Простой пример</h3>
-<pre class="brush: js notranslate">function resolveAfter2Seconds(x) {
+<pre class="brush: js">function resolveAfter2Seconds(x) {
return new Promise(resolve =&gt; {
setTimeout(() =&gt; {
resolve(x);
@@ -86,7 +86,7 @@ add2(10).then(v =&gt; {
<h3 id="Когда_функция_async_выбрасывает_исключение">Когда функция <code>async </code>выбрасывает исключение</h3>
-<pre class="brush: js notranslate">async function throwsValue() {
+<pre class="brush: js">async function throwsValue() {
throw new Error('oops');
}
throwsValue()
@@ -112,7 +112,7 @@ throwsValue()
<p>API, которое возвращает {{jsxref("Promise")}}, будет возвращать значение в цепочке, тем самым разбивая функцию на много частей. Рассматривая следующий код:</p>
-<pre class="brush: js notranslate">function getProcessedData(url) {
+<pre class="brush: js">function getProcessedData(url) {
return downloadData(url) // returns a promise
.catch(e =&gt; {
return downloadFallbackData(url) // returns a promise
@@ -125,7 +125,7 @@ throwsValue()
<p>он может быть переписан с одним использованием функции <code>async</code>:</p>
-<pre class="brush: js notranslate">async function getProcessedData(url) {
+<pre class="brush: js">async function getProcessedData(url) {
let v;
try {
v = await downloadData(url);