From 1386fed7d38652d5848d315927e7e23a66cffd13 Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Wed, 20 Oct 2021 13:28:52 +0300 Subject: [RU] Remove `name` attribute from headings (#2788) --- .../control_flow_and_error_handling/index.html | 4 +-- .../guide/expressions_and_operators/index.html | 22 ++++++------ files/ru/web/javascript/guide/functions/index.html | 16 ++++----- .../javascript/guide/grammar_and_types/index.html | 2 +- .../reference/functions/arrow_functions/index.html | 2 +- .../functions/default_parameters/index.html | 6 ++-- .../javascript/reference/functions/get/index.html | 2 +- .../web/javascript/reference/functions/index.html | 24 ++++++------- .../reference/functions/rest_parameters/index.html | 6 ++-- .../global_objects/array/@@iterator/index.html | 16 ++++----- .../global_objects/array/copywithin/index.html | 18 +++++----- .../global_objects/array/entries/index.html | 12 +++---- .../global_objects/array/every/index.html | 22 ++++++------ .../reference/global_objects/array/fill/index.html | 16 ++++----- .../global_objects/array/filter/index.html | 26 +++++++------- .../reference/global_objects/array/find/index.html | 20 +++++------ .../global_objects/array/findindex/index.html | 20 +++++------ .../global_objects/array/foreach/index.html | 22 ++++++------ .../reference/global_objects/array/from/index.html | 16 ++++----- .../reference/global_objects/array/index.html | 40 ++++++++++----------- .../global_objects/array/indexof/index.html | 22 ++++++------ .../global_objects/array/isarray/index.html | 18 +++++----- .../reference/global_objects/array/join/index.html | 18 +++++----- .../reference/global_objects/array/keys/index.html | 14 ++++---- .../global_objects/array/lastindexof/index.html | 20 +++++------ .../global_objects/array/length/index.html | 18 +++++----- .../reference/global_objects/array/map/index.html | 28 +++++++-------- .../reference/global_objects/array/of/index.html | 16 ++++----- .../reference/global_objects/array/pop/index.html | 18 +++++----- .../reference/global_objects/array/push/index.html | 22 ++++++------ .../global_objects/array/reduce/index.html | 20 +++++------ .../global_objects/array/reduceright/index.html | 22 ++++++------ .../global_objects/array/reverse/index.html | 16 ++++----- .../global_objects/array/shift/index.html | 16 ++++----- .../global_objects/array/slice/index.html | 22 ++++++------ .../reference/global_objects/array/some/index.html | 20 +++++------ .../reference/global_objects/array/sort/index.html | 22 ++++++------ .../global_objects/array/splice/index.html | 18 +++++----- .../global_objects/array/tolocalestring/index.html | 18 +++++----- .../global_objects/array/tosource/index.html | 18 +++++----- .../global_objects/array/tostring/index.html | 16 ++++----- .../global_objects/array/unshift/index.html | 18 +++++----- .../global_objects/array/values/index.html | 16 ++++----- .../reference/global_objects/boolean/index.html | 28 +++++++-------- .../global_objects/boolean/tosource/index.html | 14 ++++---- .../global_objects/boolean/tostring/index.html | 18 +++++----- .../global_objects/boolean/valueof/index.html | 18 +++++----- .../global_objects/date/getdate/index.html | 18 +++++----- .../global_objects/date/getday/index.html | 18 +++++----- .../global_objects/date/getfullyear/index.html | 18 +++++----- .../global_objects/date/gethours/index.html | 18 +++++----- .../global_objects/date/getmilliseconds/index.html | 18 +++++----- .../global_objects/date/getminutes/index.html | 18 +++++----- .../global_objects/date/getmonth/index.html | 18 +++++----- .../global_objects/date/getseconds/index.html | 18 +++++----- .../global_objects/date/gettime/index.html | 18 +++++----- .../date/gettimezoneoffset/index.html | 16 ++++----- .../global_objects/date/getutcdate/index.html | 18 +++++----- .../global_objects/date/getutcday/index.html | 18 +++++----- .../global_objects/date/getutcfullyear/index.html | 18 +++++----- .../global_objects/date/getutchours/index.html | 18 +++++----- .../date/getutcmilliseconds/index.html | 18 +++++----- .../global_objects/date/getutcminutes/index.html | 18 +++++----- .../global_objects/date/getutcmonth/index.html | 18 +++++----- .../global_objects/date/getutcseconds/index.html | 18 +++++----- .../global_objects/date/getyear/index.html | 28 +++++++-------- .../reference/global_objects/date/index.html | 26 +++++++------- .../reference/global_objects/date/now/index.html | 16 ++++----- .../reference/global_objects/date/parse/index.html | 24 ++++++------- .../global_objects/date/setdate/index.html | 18 +++++----- .../global_objects/date/setfullyear/index.html | 20 +++++------ .../global_objects/date/sethours/index.html | 18 +++++----- .../global_objects/date/setmilliseconds/index.html | 18 +++++----- .../global_objects/date/setminutes/index.html | 18 +++++----- .../global_objects/date/setmonth/index.html | 18 +++++----- .../global_objects/date/setseconds/index.html | 18 +++++----- .../global_objects/date/settime/index.html | 18 +++++----- .../global_objects/date/setutcdate/index.html | 18 +++++----- .../global_objects/date/setutcfullyear/index.html | 18 +++++----- .../global_objects/date/setutchours/index.html | 18 +++++----- .../date/setutcmilliseconds/index.html | 18 +++++----- .../global_objects/date/setutcminutes/index.html | 18 +++++----- .../global_objects/date/setutcmonth/index.html | 18 +++++----- .../global_objects/date/setutcseconds/index.html | 18 +++++----- .../global_objects/date/setyear/index.html | 18 +++++----- .../global_objects/date/todatestring/index.html | 16 ++++----- .../global_objects/date/togmtstring/index.html | 14 ++++---- .../global_objects/date/toisostring/index.html | 16 ++++----- .../global_objects/date/tojson/index.html | 16 ++++----- .../date/tolocaledatestring/index.html | 24 ++++++------- .../global_objects/date/tolocalestring/index.html | 24 ++++++------- .../date/tolocaletimestring/index.html | 24 ++++++------- .../global_objects/date/tosource/index.html | 14 ++++---- .../global_objects/date/tostring/index.html | 18 +++++----- .../global_objects/date/totimestring/index.html | 16 ++++----- .../global_objects/date/toutcstring/index.html | 18 +++++----- .../reference/global_objects/date/utc/index.html | 16 ++++----- .../global_objects/date/valueof/index.html | 18 +++++----- .../reference/global_objects/decodeuri/index.html | 6 ++-- .../global_objects/decodeuricomponent/index.html | 8 ++--- .../reference/global_objects/encodeuri/index.html | 8 ++--- .../global_objects/error/columnnumber/index.html | 12 +++---- .../global_objects/error/filename/index.html | 14 ++++---- .../reference/global_objects/error/index.html | 32 ++++++++--------- .../global_objects/error/linenumber/index.html | 14 ++++---- .../global_objects/error/message/index.html | 14 ++++---- .../reference/global_objects/error/name/index.html | 14 ++++---- .../global_objects/error/stack/index.html | 14 ++++---- .../global_objects/error/tosource/index.html | 12 +++---- .../global_objects/error/tostring/index.html | 14 ++++---- .../reference/global_objects/eval/index.html | 2 +- .../reference/global_objects/evalerror/index.html | 28 +++++++-------- .../global_objects/function/apply/index.html | 22 ++++++------ .../global_objects/function/arguments/index.html | 12 +++---- .../global_objects/function/bind/index.html | 28 +++++++-------- .../global_objects/function/call/index.html | 20 +++++------ .../global_objects/function/caller/index.html | 16 ++++----- .../global_objects/function/displayname/index.html | 10 +++--- .../global_objects/function/length/index.html | 16 ++++----- .../global_objects/function/name/index.html | 4 +-- .../global_objects/function/tosource/index.html | 14 ++++---- .../global_objects/function/tostring/index.html | 14 ++++---- .../javascript/reference/global_objects/index.html | 30 ++++++++-------- .../reference/global_objects/infinity/index.html | 10 +++--- .../global_objects/internalerror/index.html | 24 ++++++------- .../intl/collator/compare/index.html | 20 +++++------ .../global_objects/intl/collator/index.html | 32 ++++++++--------- .../intl/collator/resolvedoptions/index.html | 12 +++---- .../intl/collator/supportedlocalesof/index.html | 18 +++++----- .../intl/datetimeformat/format/index.html | 20 +++++------ .../global_objects/intl/datetimeformat/index.html | 32 ++++++++--------- .../intl/datetimeformat/resolvedoptions/index.html | 12 +++---- .../datetimeformat/supportedlocalesof/index.html | 18 +++++----- .../reference/global_objects/intl/index.html | 18 +++++----- .../intl/numberformat/format/index.html | 20 +++++------ .../global_objects/intl/numberformat/index.html | 32 ++++++++--------- .../intl/numberformat/resolvedoptions/index.html | 12 +++---- .../numberformat/supportedlocalesof/index.html | 18 +++++----- .../reference/global_objects/isfinite/index.html | 10 +++--- .../reference/global_objects/isnan/index.html | 16 ++++----- .../reference/global_objects/json/index.html | 16 ++++----- .../reference/global_objects/json/parse/index.html | 22 ++++++------ .../global_objects/json/stringify/index.html | 22 ++++++------ .../reference/global_objects/math/abs/index.html | 18 +++++----- .../reference/global_objects/math/acos/index.html | 18 +++++----- .../reference/global_objects/math/acosh/index.html | 20 +++++------ .../reference/global_objects/math/asin/index.html | 18 +++++----- .../reference/global_objects/math/asinh/index.html | 20 +++++------ .../reference/global_objects/math/atan/index.html | 18 +++++----- .../reference/global_objects/math/atan2/index.html | 18 +++++----- .../reference/global_objects/math/atanh/index.html | 20 +++++------ .../reference/global_objects/math/cbrt/index.html | 18 +++++----- .../reference/global_objects/math/ceil/index.html | 20 +++++------ .../reference/global_objects/math/clz32/index.html | 20 +++++------ .../reference/global_objects/math/cos/index.html | 18 +++++----- .../reference/global_objects/math/cosh/index.html | 20 +++++------ .../reference/global_objects/math/e/index.html | 14 ++++---- .../reference/global_objects/math/exp/index.html | 18 +++++----- .../reference/global_objects/math/expm1/index.html | 20 +++++------ .../reference/global_objects/math/floor/index.html | 20 +++++------ .../global_objects/math/fround/index.html | 20 +++++------ .../reference/global_objects/math/hypot/index.html | 20 +++++------ .../reference/global_objects/math/imul/index.html | 18 +++++----- .../reference/global_objects/math/index.html | 12 +++---- .../reference/global_objects/math/ln10/index.html | 14 ++++---- .../reference/global_objects/math/ln2/index.html | 14 ++++---- .../reference/global_objects/math/log/index.html | 20 +++++------ .../reference/global_objects/math/log10/index.html | 20 +++++------ .../global_objects/math/log10e/index.html | 14 ++++---- .../reference/global_objects/math/log1p/index.html | 20 +++++------ .../reference/global_objects/math/log2/index.html | 20 +++++------ .../reference/global_objects/math/log2e/index.html | 14 ++++---- .../reference/global_objects/math/max/index.html | 18 +++++----- .../reference/global_objects/math/min/index.html | 20 +++++------ .../reference/global_objects/math/pi/index.html | 14 ++++---- .../reference/global_objects/math/pow/index.html | 18 +++++----- .../global_objects/math/random/index.html | 10 +++--- .../reference/global_objects/math/round/index.html | 20 +++++------ .../reference/global_objects/math/sign/index.html | 20 +++++------ .../reference/global_objects/math/sin/index.html | 18 +++++----- .../reference/global_objects/math/sinh/index.html | 20 +++++------ .../reference/global_objects/math/sqrt/index.html | 18 +++++----- .../global_objects/math/sqrt1_2/index.html | 14 ++++---- .../reference/global_objects/math/sqrt2/index.html | 14 ++++---- .../reference/global_objects/math/tan/index.html | 18 +++++----- .../reference/global_objects/math/tanh/index.html | 20 +++++------ .../reference/global_objects/math/trunc/index.html | 14 ++++---- .../reference/global_objects/nan/index.html | 12 +++---- .../reference/global_objects/null/index.html | 12 +++---- .../global_objects/number/epsilon/index.html | 14 ++++---- .../reference/global_objects/number/index.html | 30 ++++++++-------- .../global_objects/number/isfinite/index.html | 18 +++++----- .../global_objects/number/isinteger/index.html | 16 ++++----- .../global_objects/number/isnan/index.html | 16 ++++----- .../global_objects/number/issafeinteger/index.html | 14 ++++---- .../number/max_safe_integer/index.html | 14 ++++---- .../global_objects/number/max_value/index.html | 14 ++++---- .../number/min_safe_integer/index.html | 12 +++---- .../global_objects/number/min_value/index.html | 14 ++++---- .../reference/global_objects/number/nan/index.html | 8 ++--- .../number/negative_infinity/index.html | 14 ++++---- .../global_objects/number/parsefloat/index.html | 14 ++++---- .../global_objects/number/parseint/index.html | 14 ++++---- .../number/positive_infinity/index.html | 14 ++++---- .../global_objects/number/toexponential/index.html | 20 +++++------ .../global_objects/number/tofixed/index.html | 20 +++++------ .../number/tolocalestring/index.html | 22 ++++++------ .../global_objects/number/toprecision/index.html | 20 +++++------ .../global_objects/number/tosource/index.html | 14 ++++---- .../global_objects/number/tostring/index.html | 20 +++++------ .../global_objects/number/valueof/index.html | 18 +++++----- .../object/__definegetter__/index.html | 16 ++++----- .../object/__definesetter__/index.html | 16 ++++----- .../object/__lookupgetter__/index.html | 16 ++++----- .../object/__lookupsetter__/index.html | 16 ++++----- .../global_objects/object/assign/index.html | 32 ++++++++--------- .../global_objects/object/constructor/index.html | 14 ++++---- .../global_objects/object/create/index.html | 20 +++++------ .../object/defineproperties/index.html | 18 +++++----- .../object/defineproperty/index.html | 34 +++++++++--------- .../global_objects/object/freeze/index.html | 16 ++++----- .../object/getownpropertydescriptor/index.html | 20 +++++------ .../object/getownpropertynames/index.html | 20 +++++------ .../object/getownpropertysymbols/index.html | 14 ++++---- .../object/getprototypeof/index.html | 18 +++++----- .../object/hasownproperty/index.html | 24 ++++++------- .../reference/global_objects/object/index.html | 28 +++++++-------- .../reference/global_objects/object/is/index.html | 18 +++++----- .../global_objects/object/isextensible/index.html | 18 +++++----- .../global_objects/object/isfrozen/index.html | 18 +++++----- .../global_objects/object/isprototypeof/index.html | 14 ++++---- .../global_objects/object/issealed/index.html | 18 +++++----- .../global_objects/object/keys/index.html | 20 +++++------ .../object/preventextensions/index.html | 16 ++++----- .../object/propertyisenumerable/index.html | 22 ++++++------ .../global_objects/object/proto/index.html | 14 ++++---- .../global_objects/object/seal/index.html | 16 ++++----- .../object/setprototypeof/index.html | 28 +++++++-------- .../object/tolocalestring/index.html | 14 ++++---- .../global_objects/object/tosource/index.html | 22 ++++++------ .../global_objects/object/tostring/index.html | 16 ++++----- .../global_objects/object/valueof/index.html | 18 +++++----- .../reference/global_objects/parsefloat/index.html | 2 +- .../reference/global_objects/parseint/index.html | 14 ++++---- .../global_objects/promise/all/index.html | 6 ++-- .../reference/global_objects/proxy/index.html | 2 +- .../reference/global_objects/rangeerror/index.html | 28 +++++++-------- .../global_objects/regexp/exec/index.html | 22 ++++++------ .../global_objects/regexp/flags/index.html | 16 ++++----- .../global_objects/regexp/global/index.html | 14 ++++---- .../global_objects/regexp/ignorecase/index.html | 14 ++++---- .../reference/global_objects/regexp/index.html | 42 +++++++++++----------- .../global_objects/regexp/lastindex/index.html | 16 ++++----- .../global_objects/regexp/multiline/index.html | 14 ++++---- .../global_objects/regexp/source/index.html | 12 +++---- .../global_objects/regexp/sticky/index.html | 16 ++++----- .../global_objects/regexp/test/index.html | 20 +++++------ .../global_objects/regexp/tosource/index.html | 14 ++++---- .../global_objects/regexp/tostring/index.html | 18 +++++----- .../reference/global_objects/set/index.html | 4 +-- .../global_objects/string/@@iterator/index.html | 14 ++++---- .../global_objects/string/anchor/index.html | 18 +++++----- .../reference/global_objects/string/big/index.html | 16 ++++----- .../global_objects/string/blink/index.html | 16 ++++----- .../global_objects/string/bold/index.html | 16 ++++----- .../global_objects/string/charat/index.html | 22 ++++++------ .../global_objects/string/charcodeat/index.html | 22 ++++++------ .../global_objects/string/codepointat/index.html | 20 +++++------ .../global_objects/string/concat/index.html | 20 +++++------ .../global_objects/string/endswith/index.html | 20 +++++------ .../global_objects/string/fixed/index.html | 16 ++++----- .../global_objects/string/fontcolor/index.html | 18 +++++----- .../global_objects/string/fontsize/index.html | 18 +++++----- .../global_objects/string/fromcharcode/index.html | 20 +++++------ .../global_objects/string/fromcodepoint/index.html | 22 ++++++------ .../reference/global_objects/string/index.html | 38 ++++++++++---------- .../global_objects/string/indexof/index.html | 26 +++++++------- .../global_objects/string/italics/index.html | 16 ++++----- .../global_objects/string/lastindexof/index.html | 20 +++++------ .../global_objects/string/length/index.html | 16 ++++----- .../global_objects/string/link/index.html | 18 +++++----- .../global_objects/string/localecompare/index.html | 26 +++++++------- .../global_objects/string/match/index.html | 24 ++++++------- .../global_objects/string/normalize/index.html | 20 +++++------ .../reference/global_objects/string/raw/index.html | 20 +++++------ .../global_objects/string/repeat/index.html | 14 ++++---- .../global_objects/string/replace/index.html | 34 +++++++++--------- .../global_objects/string/search/index.html | 18 +++++----- .../global_objects/string/slice/index.html | 20 +++++------ .../global_objects/string/small/index.html | 16 ++++----- .../global_objects/string/split/index.html | 26 +++++++------- .../global_objects/string/startswith/index.html | 18 +++++----- .../global_objects/string/strike/index.html | 16 ++++----- .../reference/global_objects/string/sub/index.html | 16 ++++----- .../global_objects/string/substr/index.html | 18 +++++----- .../global_objects/string/substring/index.html | 22 ++++++------ .../reference/global_objects/string/sup/index.html | 16 ++++----- .../string/tolocalelowercase/index.html | 16 ++++----- .../string/tolocaleuppercase/index.html | 16 ++++----- .../global_objects/string/tolowercase/index.html | 16 ++++----- .../global_objects/string/tosource/index.html | 12 +++---- .../global_objects/string/tostring/index.html | 16 ++++----- .../global_objects/string/touppercase/index.html | 16 ++++----- .../global_objects/string/trim/index.html | 18 +++++----- .../global_objects/string/trimend/index.html | 16 ++++----- .../global_objects/string/trimstart/index.html | 16 ++++----- .../global_objects/string/valueof/index.html | 16 ++++----- .../reference/global_objects/symbol/index.html | 20 +++++------ .../global_objects/syntaxerror/index.html | 30 ++++++++-------- .../reference/global_objects/typedarray/index.html | 4 +-- .../global_objects/typedarray/join/index.html | 2 +- .../reference/global_objects/typeerror/index.html | 30 ++++++++-------- .../reference/global_objects/undefined/index.html | 20 +++++------ .../reference/global_objects/unescape/index.html | 10 +++--- .../reference/global_objects/uneval/index.html | 10 +++--- .../reference/global_objects/urierror/index.html | 30 ++++++++-------- .../reference/global_objects/weakmap/index.html | 10 +++--- .../global_objects/weakset/add/index.html | 14 ++++---- .../global_objects/weakset/delete/index.html | 14 ++++---- .../global_objects/weakset/has/index.html | 16 ++++----- .../reference/global_objects/weakset/index.html | 22 ++++++------ .../global_objects/webassembly/compile/index.html | 2 +- .../webassembly/compilestreaming/index.html | 2 +- .../global_objects/webassembly/index.html | 2 +- .../global_objects/webassembly/table/index.html | 2 +- files/ru/web/javascript/reference/index.html | 10 +++--- .../reference/lexical_grammar/index.html | 6 ++-- .../reference/operators/delete/index.html | 14 ++++---- .../reference/operators/function/index.html | 14 ++++---- .../web/javascript/reference/operators/index.html | 32 ++++++++--------- .../operators/operator_precedence/index.html | 4 +-- .../javascript/reference/operators/this/index.html | 2 +- .../javascript/reference/operators/void/index.html | 2 +- .../reference/operators/yield/index.html | 10 +++--- .../reference/statements/const/index.html | 4 +-- .../reference/statements/continue/index.html | 10 +++--- .../reference/statements/for...of/index.html | 2 +- .../javascript/reference/statements/for/index.html | 12 +++---- .../reference/statements/function_star_/index.html | 6 ++-- .../web/javascript/reference/statements/index.html | 16 ++++----- .../reference/statements/switch/index.html | 14 ++++---- .../reference/statements/throw/index.html | 14 ++++---- .../reference/template_literals/index.html | 4 +-- 343 files changed, 2935 insertions(+), 2935 deletions(-) (limited to 'files/ru/web/javascript') diff --git a/files/ru/web/javascript/guide/control_flow_and_error_handling/index.html b/files/ru/web/javascript/guide/control_flow_and_error_handling/index.html index b2b7191228..005a702243 100644 --- a/files/ru/web/javascript/guide/control_flow_and_error_handling/index.html +++ b/files/ru/web/javascript/guide/control_flow_and_error_handling/index.html @@ -229,7 +229,7 @@ catch (e) { -

Блок catch

+

Блок catch

Используйте блок catch, чтобы обработать исключения, сгенерированные в блоке try.

@@ -304,7 +304,7 @@ catch (e) { // В результате отображается сообщение caught inner "bogus" // и возвращается значение `false` -

Вложенные инструкции try...catch

+

Вложенные инструкции try...catch

Вы можете вкладывать инструкции try...catch друг в друга. Если внутренняя инструкция try...catch не имеет блока catch, то она должна иметь блок finally, кроме того исключение будет перехвачено во внешнем блоке catch. Для получения большей информации ознакомьтесь с вложенными try-блоками.

diff --git a/files/ru/web/javascript/guide/expressions_and_operators/index.html b/files/ru/web/javascript/guide/expressions_and_operators/index.html index cef61fdc23..72a273b6b7 100644 --- a/files/ru/web/javascript/guide/expressions_and_operators/index.html +++ b/files/ru/web/javascript/guide/expressions_and_operators/index.html @@ -327,7 +327,7 @@ console.log(1 / 2 == 1.0 / 2.0); /* возвращает true */ -

Битовые логические операторы

+

Битовые логические операторы

Основной смысл работы битовых логических операторов состоит в следующем:

@@ -382,7 +382,7 @@ console.log(1 / 2 == 1.0 / 2.0); /* возвращает true */

Обратите внимание, что все 32 бита преобразуются с использованием битового оператора НЕ, и что величины с наиболее значимым (самым левым) битом равным 1 представляют собой отрицательные числа (в представлении дополнения до двух).

-

Битовые операторы сдвига

+

Битовые операторы сдвига

Битовые операторы сдвига используют два операнда: первый представляет величину, подлежащую сдвигу, а второй операнд указывает число битовых позиций на которое должен быть сдвинут первый операнд. Направление операции сдвига определяется используемым оператором.

@@ -482,7 +482,7 @@ var n2 = !false; // !f возвращает true var n3 = !"Cat"; // !t возвращает false -

Сокращённая оценка

+

Сокращённая оценка

Так как логические выражения вычисляются слева направо, они проверяются на возможность выполнения сокращённой оценки с использованием следующих правил:

@@ -504,7 +504,7 @@ var n3 = !"Cat"; // !t возвращает false
var  mystring = "alpha";  mystring += "bet"; // получается значение "alphabet" и присваивается mystring.
 
-

Условный (тернарный) оператор

+

Условный (тернарный) оператор

Условный оператор является единственным оператором JavaScript, который использует три операнда. Оператор принимает одно из двух значений в зависимости от заданного условия. Синтаксис оператора:

@@ -522,7 +522,7 @@ var n3 = !"Cat"; // !t возвращает false

Данное выражение присваивает значение "adult" переменной status, если age имеет значение 18 или более. В противном случае переменной status присваивается значение "minor".

-

Оператор запятая

+

Оператор запятая

Оператор запятая (,) просто вычисляет оба операнда и возвращает значение последнего операнда. Данный оператор в основном используется внутри цикла for, что позволяет при каждом прохождении цикла одновременно обновлять значения нескольких переменных.

@@ -536,7 +536,7 @@ var n3 = !"Cat"; // !t возвращает false

Унарная операция - операция только с одним операндом.

-

delete

+

delete

Оператор delete выполняет удаление объекта, свойства объекта, или элемента массива с заданным индексом. Синтаксис оператора:

@@ -587,7 +587,7 @@ if (3 in trees) { } -

Оператор typeof

+

Оператор typeof

Оператор typeof используется одним из следующих способов:

@@ -648,7 +648,7 @@ typeof Math; // возвращает "object" typeof Option; // возвращает "function" typeof String; // возвращает "function" -

Оператор void

+

Оператор void

Оператор void используется любым из следующих способов:

@@ -705,7 +705,7 @@ var mycar = {make: "Honda", model: "Accord", year: 1998}; "model" in mycar; // возвращает true -

Оператор instanceof

+

Оператор instanceof

Оператор instanceof возвращает true, если заданный объект является объектом указанного типа. Его синтаксис:

@@ -832,7 +832,7 @@ if (theDay instanceof Date) {

Базовые ключевые слова и основные выражения в JavaScript.

-

Оператор this

+

Оператор this

Используйте ключевое слово this для указания на текущий объект. В общем случае this указывает на вызываемый объект, которому принадлежит данный метод. Используйте this следующим образом:

@@ -899,7 +899,7 @@ var abc = [ "A", "B", "C" ];

Значениям слева назначаются значения справа.

-

new

+

new

Вы можете использовать оператор new для создания экземпляра объекта пользовательского типа или одного из встроенных объектов. Используйте оператор new следующим образом:

diff --git a/files/ru/web/javascript/guide/functions/index.html b/files/ru/web/javascript/guide/functions/index.html index 28385a4c3e..5b7881e6bb 100644 --- a/files/ru/web/javascript/guide/functions/index.html +++ b/files/ru/web/javascript/guide/functions/index.html @@ -35,7 +35,7 @@ translation_of: Web/JavaScript/Guide/Functions
  • сборщик мусора (garbage collector)
  • -

    Объявление функций

    +

    Объявление функций

    Функции вида "function declaration statement"

    @@ -134,7 +134,7 @@ if (num === 0) {

    Метод — это функция, которая является свойством объекта. Узнать больше про объекты и методы можно по ссылке: Работа с объектами.

    -

    Вызовы функций

    +

    Вызовы функций

    Объявление функции не выполняет её. Объявление функции просто называет функцию и указывает, что делать при вызове функции.

    @@ -186,7 +186,7 @@ e = factorial(5); // e gets the value 120

    Есть другие способы вызвать функцию. Существуют частые случаи, когда функции необходимо вызывать динамически, или поменять номера аргументов функции, или необходимо вызвать функцию с привязкой к определённому контексту. Оказывается, что функции сами по себе являются объектами, и эти объекты в свою очередь имеют методы (посмотрите объект Function). Один из них это метод apply(), использование которого может достигнуть этой цели.

    -

    Область видимости функций

    +

    Область видимости функций

    (function scope)

    @@ -219,7 +219,7 @@ function getScore() { getScore(); // вернёт "Chamahk scored 5" -

    Scope и стек функции

    +

    Scope и стек функции

    (function stack)

    @@ -397,7 +397,7 @@ outside()(10); // возвращает 20 вместо 10

    Конфликт имени произошёл в инструкции return x * 2 между параметром x функции inside и переменной x функции outside. Scope chain здесь будет таким: {inside ==> outside ==> глобальный объект (global object)}. Следовательно x функции inside имеет больший приоритет по сравнению с outside, и нам вернулось 20 (= 10 * 2), а не 10 (= 5 * 2).

    -

    Замыкания

    +

    Замыкания

    (Closures)

    @@ -482,7 +482,7 @@ getCode(); // Returns the apiCode } -

    Использование объекта arguments

    +

    Использование объекта arguments

    Объект arguments функции является псевдо-массивом. Внутри функции вы можете ссылаться к аргументам следующим образом:

    @@ -524,7 +524,7 @@ myConcat('. ', 'sage', 'basil', 'oregano', 'pepper', 'parsley');

    Рассмотрите объект Function в JavaScript-справочнике для большей информации.

    -

    Параметры функции

    +

    Параметры функции

    Начиная с ECMAScript 2015 появились два новых вида параметров: параметры по умолчанию (default parameters) и остаточные параметры (rest parameters).

    @@ -564,7 +564,7 @@ var arr = multiply(2, 1, 2, 3); console.log(arr); // [2, 4, 6] -

    Стрелочные функции

    +

    Стрелочные функции

    (Arrow functions)

    diff --git a/files/ru/web/javascript/guide/grammar_and_types/index.html b/files/ru/web/javascript/guide/grammar_and_types/index.html index c8b06a30ed..c5c33e9d11 100644 --- a/files/ru/web/javascript/guide/grammar_and_types/index.html +++ b/files/ru/web/javascript/guide/grammar_and_types/index.html @@ -207,7 +207,7 @@ var baz = function() {

    Следовательно, вы можете обращаться к глобальным переменным, объявленным в одном объекте window или frame из другого объекта window или frame, указав имя window или frame. Например, если переменная phoneNumber объявлена в документе, то вы можете сослаться на эту переменную из iframe как parent.phoneNumber.

    -

    Константы

    +

    Константы

    Вы можете создать именованную константу, доступную только для чтения, используя ключевое слово {{jsxref("Statements/const", "const")}}. Синтаксис идентификатора константы является таким же, как и у идентификатора переменной: он должен начинаться с буквы, нижнего подчёркивания или знака $ и может содержать буквы, цифры или нижнее подчёркивание.

    diff --git a/files/ru/web/javascript/reference/functions/arrow_functions/index.html b/files/ru/web/javascript/reference/functions/arrow_functions/index.html index 8cabc98dcb..35acaa7be7 100644 --- a/files/ru/web/javascript/reference/functions/arrow_functions/index.html +++ b/files/ru/web/javascript/reference/functions/arrow_functions/index.html @@ -13,7 +13,7 @@ translation_of: Web/JavaScript/Reference/Functions/Arrow_functions

    Выражения стрелочных функций имеют более короткий синтаксис по сравнению с функциональными выражениями и лексически привязаны к значению this (но не привязаны к собственному thisargumentssuper, или new.target). Выражение стрелочных функций не позволяют задавать имя, поэтому стрелочные функции анонимны, если их ни к чему не присвоить.

    -

    Синтаксис

    +

    Синтаксис

    Базовый синтаксис

    diff --git a/files/ru/web/javascript/reference/functions/default_parameters/index.html b/files/ru/web/javascript/reference/functions/default_parameters/index.html index bff4368a58..4ae72d4289 100644 --- a/files/ru/web/javascript/reference/functions/default_parameters/index.html +++ b/files/ru/web/javascript/reference/functions/default_parameters/index.html @@ -14,14 +14,14 @@ translation_of: Web/JavaScript/Reference/Functions/Default_parameters

    {{EmbedInteractiveExample("pages/js/functions-default.html")}}

    -

    Синтаксис

    +

    Синтаксис

    function [name]([param1[ = defaultValue1 ][, ..., paramN[ = defaultValueN ]]]) {
        statements
     }
     
    -

    Описание

    +

    Описание

    В JavaScript параметры функции, которым при её вызове не передаются значения, принимают по умолчанию значение {{jsxref("undefined")}}. Однако в некоторых случаях может быть полезно задать иное значение по умолчанию. Именно для таких случаев предназначены параметры по умолчанию.

    @@ -210,7 +210,7 @@ f(); // 6

    {{Compat("javascript.functions.default_parameters")}}

    -

    Смотрите также

    +

    Смотрите также