From 2545225d5742f54e55d1da273b138a4338fcc637 Mon Sep 17 00:00:00 2001 From: Nikolay Gagarinov Date: Fri, 11 Sep 2026 18:47:00 +0500 Subject: [PATCH 1/4] =?UTF-8?q?fix(lesson):=20FEEDBACK-443=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=D0=B2=D0=B5=D1=81=D1=82=D0=B8=20=D0=BA=D0=B0=D0=B2=D1=8B?= =?UTF-8?q?=D1=87=D0=BA=D0=B8=20=D0=BA=20=D1=80=D0=B5=D0=BA=D0=BE=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D0=B4=D0=B0=D1=86=D0=B8=D0=B8=20=D0=BB=D0=B8=D0=BD?= =?UTF-8?q?=D1=82=D0=B5=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Уроки рекомендовали одинарные кавычки со ссылкой на стиль AirBnb, а весь код курса и все практики стоят на двойных: их ставит oxfmt, и по `docs/js-code-style.md` дефолт инструмента и есть канон кита. Студент читал одно, а в редакторе видел другое. Рекомендация переписана: единого правила в сообществе нет, курс держится двойных, одинарные берутся когда внутри строки есть двойные. Следом поправлен пример с апострофом — внутри двойных кавычек он проблемы не создаёт, и прежнее объяснение про сломанный синтаксис к нему больше не подходит. Заодно восстановлены съеденные форматтером примеры: демонстрация двух форм записи и экранирование двойной кавычки, которое прогон переписал в экранирование апострофа, хотя текст рядом описывает первое. Блоки помечены как антипримеры. Co-Authored-By: Claude Opus 5 (1M context) --- modules/10-basics/10-hello-world/en/README.md | 10 ++++++---- modules/10-basics/10-hello-world/es/README.md | 10 ++++++---- modules/10-basics/10-hello-world/ru/README.md | 10 ++++++---- modules/25-strings/10-quotes/en/README.md | 14 +++++++++----- modules/25-strings/10-quotes/es/README.md | 14 +++++++++----- modules/25-strings/10-quotes/ru/README.md | 14 +++++++++----- 6 files changed, 45 insertions(+), 27 deletions(-) diff --git a/modules/10-basics/10-hello-world/en/README.md b/modules/10-basics/10-hello-world/en/README.md index 23370d58..84c492ed 100644 --- a/modules/10-basics/10-hello-world/en/README.md +++ b/modules/10-basics/10-hello-world/en/README.md @@ -18,14 +18,16 @@ console.log("Hexlet - programming school"); The command stays the same, only the contents of the parentheses change. So that the program understands that this is exactly text, it is enclosed in quotes. You can use single `'...'` or double `"..."` quotes, but the opening and closing quotes must match. -```javascript -console.log("Hexlet - programming school"); + + +```text +console.log('Hexlet - programming school'); ``` -According to the style accepted in the JavaScript community, single quotes are recommended for strings. If there is an apostrophe inside the string, single quotes will break the syntax, so in such cases double quotes are used. +In this course we use double quotes: that is the style of the formatter that checks the code in the exercises. Single quotes are used when the string contains double quotes. An apostrophe inside double quotes is not a problem: ```javascript -console.log("it's JavaScript"); // apostrophe inside, so double quotes +console.log("it's JavaScript"); // an apostrophe inside double quotes is an ordinary character ``` ## The meaning of symbols diff --git a/modules/10-basics/10-hello-world/es/README.md b/modules/10-basics/10-hello-world/es/README.md index 936e1854..0f9966da 100644 --- a/modules/10-basics/10-hello-world/es/README.md +++ b/modules/10-basics/10-hello-world/es/README.md @@ -20,14 +20,16 @@ console.log("Hexlet - escuela de programación"); El comando sigue siendo el mismo, solo cambia el contenido entre paréntesis. Para que el programa entienda que se trata precisamente de texto, este se encierra entre comillas. Puedes usar comillas simples `'...'` o dobles `"..."`, pero las comillas de apertura y de cierre deben coincidir. -```javascript -console.log("Hexlet - escuela de programación"); + + +```text +console.log('Hexlet - escuela de programación'); ``` -Según el estilo aceptado en la comunidad de JavaScript, se recomienda usar comillas simples para las cadenas. Si dentro de la cadena hay un apóstrofo, las comillas simples romperán la sintaxis, por lo que en esos casos se usan comillas dobles. +En este curso usamos comillas dobles: ese es el estilo del formateador con el que se revisa el código de los ejercicios. Las simples las usamos cuando dentro de la cadena hay comillas dobles. Un apóstrofo dentro de comillas dobles no causa ningún problema: ```javascript -console.log("it's JavaScript"); // apóstrofo dentro, por eso comillas dobles +console.log("it's JavaScript"); // un apóstrofo dentro de comillas dobles es un carácter normal ``` ## El significado de los símbolos diff --git a/modules/10-basics/10-hello-world/ru/README.md b/modules/10-basics/10-hello-world/ru/README.md index b4b96890..186b4caf 100644 --- a/modules/10-basics/10-hello-world/ru/README.md +++ b/modules/10-basics/10-hello-world/ru/README.md @@ -20,14 +20,16 @@ console.log("Хекслет - школа программирования"); Команда остается той же, меняется только содержимое скобок. Чтобы программа понимала, что это именно текст, он заключается в кавычки. Можно использовать одинарные `'...'` или двойные `"..."`, но открывающая и закрывающая кавычки должны совпадать. -```javascript -console.log("Хекслет - школа программирования"); + + +```text +console.log('Хекслет - школа программирования'); ``` -По принятому в JavaScript-сообществе стилю для строк рекомендуется использовать одинарные кавычки. Если внутри строки есть апостроф, одинарные кавычки сломают синтаксис, поэтому в таких случаях используют двойные. +В этом курсе мы используем двойные кавычки — этого же стиля придерживается форматтер, которым проверяется код в практиках. Одинарные берём тогда, когда внутри строки есть двойные. Апостроф внутри двойных кавычек проблемы не создаёт: ```javascript -console.log("it's JavaScript"); // апостроф внутри, поэтому двойные кавычки +console.log("it's JavaScript"); // апостроф внутри двойных кавычек это обычный символ ``` ## Значение символов diff --git a/modules/25-strings/10-quotes/en/README.md b/modules/25-strings/10-quotes/en/README.md index 2c65e115..2adca501 100644 --- a/modules/25-strings/10-quotes/en/README.md +++ b/modules/25-strings/10-quotes/en/README.md @@ -49,12 +49,14 @@ To avoid confusion, in this course we will use the following wording. In JavaScript, strings can be written in both single and double quotes. -```javascript -console.log("Hello"); + + +```text +console.log('Hello'); console.log("Hello"); ``` -By default, it is customary to use single quotes `'` if double quotes are not required inside the string. This style is followed by the popular code style standard from [AirBnb](https://github.com/airbnb/javascript). +There is no single rule in the JavaScript community: some guides pick single quotes and others pick double ones. What matters is sticking to one style. In this course we use double quotes, and single ones when the string contains double quotes: that is the style of the formatter that checks the code in the exercises. ## The problem with quotes inside a string @@ -87,8 +89,10 @@ Dragon's mother said "No" In this case, to keep JavaScript from confusing the quotes inside the string with the outer ones, an escape character is used — the backslash `\`. It tells the interpreter that the character following it is part of the string, not a control character. -```javascript -console.log('Dragon\'s mother said "No"'); + + +```text +console.log("Dragon's mother said \"No\""); // => Dragon's mother said "No" ``` diff --git a/modules/25-strings/10-quotes/es/README.md b/modules/25-strings/10-quotes/es/README.md index fd61fc82..cad2856c 100644 --- a/modules/25-strings/10-quotes/es/README.md +++ b/modules/25-strings/10-quotes/es/README.md @@ -49,12 +49,14 @@ Para evitar confusiones, en este curso usaremos las siguientes formulaciones. En JavaScript, las cadenas de texto se pueden escribir tanto entre comillas simples como entre comillas dobles. -```javascript -console.log("Hello"); + + +```text +console.log('Hello'); console.log("Hello"); ``` -Por defecto, se acostumbra usar comillas simples `'` si no se requieren comillas dobles dentro de la cadena. Este estilo lo sigue el popular estándar de formato de código de [AirBnb](https://github.com/airbnb/javascript). +No hay una regla única en la comunidad de JavaScript: unas guías eligen las comillas simples y otras las dobles. Lo importante es mantener un solo estilo. En este curso usamos las dobles, y las simples cuando dentro de la cadena hay comillas dobles: ese es el estilo del formateador con el que se revisa el código de los ejercicios. ## El problema con las comillas dentro de una cadena @@ -87,8 +89,10 @@ Dragon's mother said "No" En este caso, para que JavaScript no confunda las comillas dentro de la cadena con las exteriores, se utiliza el carácter de escape: la barra invertida `\`. Le indica al intérprete que el carácter que la sigue es parte de la cadena y no un carácter de control. -```javascript -console.log('Dragon\'s mother said "No"'); + + +```text +console.log("Dragon's mother said \"No\""); // => Dragon's mother said "No" ``` diff --git a/modules/25-strings/10-quotes/ru/README.md b/modules/25-strings/10-quotes/ru/README.md index 55164e8b..3880385c 100644 --- a/modules/25-strings/10-quotes/ru/README.md +++ b/modules/25-strings/10-quotes/ru/README.md @@ -51,12 +51,14 @@ console.log(5); В JavaScript строки можно записывать как в одинарных, так и в двойных кавычках. -```javascript -console.log("Hello"); + + +```text +console.log('Hello'); console.log("Hello"); ``` -По умолчанию принято использовать одинарные кавычки `'`, если внутри строки не требуется двойных. Этого стиля придерживается популярный стандарт оформления кода от [AirBnb](https://github.com/airbnb/javascript). +Единого правила в JavaScript-сообществе нет: одни руководства выбирают одинарные кавычки, другие двойные. Важно держаться одного стиля. В этом курсе мы используем двойные, а одинарные берём тогда, когда внутри строки есть двойные — этого же стиля придерживается форматтер, которым проверяется код в практиках. ## Проблема с кавычками внутри строки @@ -89,8 +91,10 @@ Dragon's mother said "No" В этом случае, чтобы JavaScript не спутал кавычки внутри строки с внешними, используют символ экранирования — обратный слэш `\`. Он говорит интерпретатору, что следующий за ним символ является частью строки, а не управляющим символом. -```javascript -console.log('Dragon\'s mother said "No"'); + + +```text +console.log("Dragon's mother said \"No\""); // => Dragon's mother said "No" ``` From 8e1016c0f00bdef5fb0226bb30ff6e3ed703a77f Mon Sep 17 00:00:00 2001 From: Nikolay Gagarinov Date: Fri, 11 Sep 2026 19:23:38 +0500 Subject: [PATCH 2/4] =?UTF-8?q?fix(lesson):=20FEEDBACK-443=20=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D0=BD=D1=83=D1=82=D1=8C=20=D0=B2=20=D1=83=D1=80=D0=BE?= =?UTF-8?q?=D0=BA=20=D1=81=D1=82=D0=BE=D0=BB=D0=BA=D0=BD=D0=BE=D0=B2=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=B0=D0=B2=D1=8B=D1=87=D0=B5=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Смена рекомендации на двойные обесценила пример с апострофом: под одинарными по умолчанию он показывал, почему кавычки приходится менять, а под двойными апостроф внутри проблемы не создаёт. Абзац остался, но учить перестал. Правило то же, только зеркальное: строку обрывает кавычка, совпадающая с внешней, поэтому при двойных снаружи столкновение даёт двойная внутри. Пример дополнен второй строкой, которая это показывает, и абзац снова описывает случай, а не факт. Блок намеренно не помечен: oxfmt обе строки оставляет как есть — проверено прогоном, — то есть пример совпадает с тем, что делает форматтер, и защищать его от прогона не нужно. Co-Authored-By: Claude Opus 5 (1M context) --- modules/10-basics/10-hello-world/en/README.md | 3 ++- modules/10-basics/10-hello-world/es/README.md | 3 ++- modules/10-basics/10-hello-world/ru/README.md | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/10-basics/10-hello-world/en/README.md b/modules/10-basics/10-hello-world/en/README.md index 84c492ed..4828fe0a 100644 --- a/modules/10-basics/10-hello-world/en/README.md +++ b/modules/10-basics/10-hello-world/en/README.md @@ -24,10 +24,11 @@ The command stays the same, only the contents of the parentheses change. So that console.log('Hexlet - programming school'); ``` -In this course we use double quotes: that is the style of the formatter that checks the code in the exercises. Single quotes are used when the string contains double quotes. An apostrophe inside double quotes is not a problem: +In this course we use double quotes: that is the style of the formatter that checks the code in the exercises. Single quotes are used when the string contains double quotes: a quote that matches the outer one ends the string too early. ```javascript console.log("it's JavaScript"); // an apostrophe inside double quotes is an ordinary character +console.log('He said "No"'); // double quotes inside, so single quotes outside ``` ## The meaning of symbols diff --git a/modules/10-basics/10-hello-world/es/README.md b/modules/10-basics/10-hello-world/es/README.md index 0f9966da..632c8c27 100644 --- a/modules/10-basics/10-hello-world/es/README.md +++ b/modules/10-basics/10-hello-world/es/README.md @@ -26,10 +26,11 @@ El comando sigue siendo el mismo, solo cambia el contenido entre paréntesis. Pa console.log('Hexlet - escuela de programación'); ``` -En este curso usamos comillas dobles: ese es el estilo del formateador con el que se revisa el código de los ejercicios. Las simples las usamos cuando dentro de la cadena hay comillas dobles. Un apóstrofo dentro de comillas dobles no causa ningún problema: +En este curso usamos comillas dobles: ese es el estilo del formateador con el que se revisa el código de los ejercicios. Las simples las usamos cuando dentro de la cadena hay comillas dobles: una comilla igual a la exterior termina la cadena antes de tiempo. ```javascript console.log("it's JavaScript"); // un apóstrofo dentro de comillas dobles es un carácter normal +console.log('Él dijo "No"'); // comillas dobles dentro, por eso las exteriores son simples ``` ## El significado de los símbolos diff --git a/modules/10-basics/10-hello-world/ru/README.md b/modules/10-basics/10-hello-world/ru/README.md index 186b4caf..c705349c 100644 --- a/modules/10-basics/10-hello-world/ru/README.md +++ b/modules/10-basics/10-hello-world/ru/README.md @@ -26,10 +26,11 @@ console.log("Хекслет - школа программирования"); console.log('Хекслет - школа программирования'); ``` -В этом курсе мы используем двойные кавычки — этого же стиля придерживается форматтер, которым проверяется код в практиках. Одинарные берём тогда, когда внутри строки есть двойные. Апостроф внутри двойных кавычек проблемы не создаёт: +В этом курсе мы используем двойные кавычки — этого же стиля придерживается форматтер, которым проверяется код в практиках. Одинарные берём тогда, когда внутри строки есть двойные: кавычка, совпадающая с внешней, оборвёт строку раньше времени. ```javascript console.log("it's JavaScript"); // апостроф внутри двойных кавычек это обычный символ +console.log('Он сказал "Нет"'); // двойные кавычки внутри, поэтому снаружи одинарные ``` ## Значение символов From b1f0014cec07f12eab824c808f5f657795375c48 Mon Sep 17 00:00:00 2001 From: Nikolay Gagarinov Date: Fri, 11 Sep 2026 19:27:21 +0500 Subject: [PATCH 3/4] =?UTF-8?q?fix(lesson):=20FEEDBACK-443=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BA=D0=B0=D0=B7=D0=B0=D1=82=D1=8C=20=D1=8D=D0=BA=D1=80=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=B0?= =?UTF-8?q?=D0=BF=D0=BE=D1=81=D1=82=D1=80=D0=BE=D1=84=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Урок показывал два способа разойтись со столкновением кавычек — сменить внешние и оставить апостроф внутри двойных, — но не третий, само экранирование. Добавлен пример с апострофом под слэшем вместе с объяснением, что слэш делает. Рядом сказано, почему в готовом коде такая запись встречается редко: oxfmt сам переписывает её на кавычки без слэша. По той же причине блок помечен как антипример — без пометки следующий прогон форматтера его съест. Так уже сломалось экранирование в уроке про строки. Co-Authored-By: Claude Opus 5 (1M context) --- modules/10-basics/10-hello-world/en/README.md | 10 ++++++++++ modules/10-basics/10-hello-world/es/README.md | 10 ++++++++++ modules/10-basics/10-hello-world/ru/README.md | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/modules/10-basics/10-hello-world/en/README.md b/modules/10-basics/10-hello-world/en/README.md index 4828fe0a..2b4a635c 100644 --- a/modules/10-basics/10-hello-world/en/README.md +++ b/modules/10-basics/10-hello-world/en/README.md @@ -31,6 +31,16 @@ console.log("it's JavaScript"); // an apostrophe inside double quotes is an ordi console.log('He said "No"'); // double quotes inside, so single quotes outside ``` +The outer quotes can also stay as they are: the inner one is marked with a backslash `\`, and then it no longer ends the string. This is called escaping. + + + +```text +console.log('it\'s JavaScript'); // the apostrophe is escaped, the string continues +``` + +The formatter rewrites this form with quotes and no backslash, so you rarely see it in finished code. It is needed when a string contains both kinds of quotes at once. + ## The meaning of symbols Code consists of commands, and each of them must be written in a specific form. Besides letters, quotes `'` and `"`, parentheses `()`, and punctuation marks are important in code. A missing or mixed-up sign will cause the program not to run. Try to determine what error was made in each of the lines? diff --git a/modules/10-basics/10-hello-world/es/README.md b/modules/10-basics/10-hello-world/es/README.md index 632c8c27..a39e6474 100644 --- a/modules/10-basics/10-hello-world/es/README.md +++ b/modules/10-basics/10-hello-world/es/README.md @@ -33,6 +33,16 @@ console.log("it's JavaScript"); // un apóstrofo dentro de comillas dobles es un console.log('Él dijo "No"'); // comillas dobles dentro, por eso las exteriores son simples ``` +Las comillas exteriores también se pueden dejar como están: la de dentro se marca con una barra invertida `\` y entonces ya no termina la cadena. Esto se llama escapado. + + + +```text +console.log('it\'s JavaScript'); // el apóstrofo está escapado, la cadena continúa +``` + +El formateador reescribe esa forma con comillas sin barra, así que en el código terminado se ve pocas veces. Sirve cuando la cadena contiene los dos tipos de comillas a la vez. + ## El significado de los símbolos El código está formado por comandos, y cada uno de ellos debe escribirse de una forma determinada. Además de las letras, en el código son importantes las comillas `'` y `"`, los paréntesis `()` y los signos de puntuación. Un signo omitido o confundido hará que el programa no se ejecute. ¿Puedes intentar determinar qué error se cometió en cada una de las líneas? diff --git a/modules/10-basics/10-hello-world/ru/README.md b/modules/10-basics/10-hello-world/ru/README.md index c705349c..ce7b0b5b 100644 --- a/modules/10-basics/10-hello-world/ru/README.md +++ b/modules/10-basics/10-hello-world/ru/README.md @@ -33,6 +33,16 @@ console.log("it's JavaScript"); // апостроф внутри двойных console.log('Он сказал "Нет"'); // двойные кавычки внутри, поэтому снаружи одинарные ``` +Внешние кавычки можно и не менять: внутреннюю помечают обратным слэшем `\`, и тогда она не обрывает строку. Это называется экранированием. + + + +```text +console.log('it\'s JavaScript'); // апостроф экранирован, строка продолжается +``` + +Форматтер такую запись переписывает на кавычки без слэша, поэтому в готовом коде она встречается редко. Пригодится она тогда, когда в строке есть оба вида кавычек сразу. + ## Значение символов Код состоит из команд, и каждая из них должна быть написана в определенной форме. Помимо букв, в коде важны кавычки `'` и `"`, скобки `()` и знаки препинания. Пропущенный или перепутанный знак приведет к тому, что программа не запустится. Попробуйте определить, какую ошибку допустили в каждой из строк? From cfa092e9c0754d5aa846a9d57721f134e5834eef Mon Sep 17 00:00:00 2001 From: Nikolay Gagarinov Date: Fri, 11 Sep 2026 19:35:08 +0500 Subject: [PATCH 4/4] =?UTF-8?q?fix(lesson):=20FEEDBACK-443=20=D1=83=D0=B1?= =?UTF-8?q?=D1=80=D0=B0=D1=82=D1=8C=20=D1=8D=D0=BA=D1=80=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=B8=D0=B7=20?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B2=D0=BE=D0=B3=D0=BE=20=D1=83=D1=80=D0=BE?= =?UTF-8?q?=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Экранированию в курсе отведён отдельный урок, `250-escape-characters`, а перед ним `240-strings` разбирает экранирование кавычек в обе стороны, включая апостроф под слэшем. Пример в `100-hello-world` это дублировал и выдавал обратный слэш студенту, который за пятнадцать уроков до темы не видел ещё ни одной управляющей последовательности. Столкновение кавычек в уроке остаётся: оно там по месту и объясняет, зачем вообще менять внешние кавычки. Co-Authored-By: Claude Opus 5 (1M context) --- modules/10-basics/10-hello-world/en/README.md | 10 ---------- modules/10-basics/10-hello-world/es/README.md | 10 ---------- modules/10-basics/10-hello-world/ru/README.md | 10 ---------- 3 files changed, 30 deletions(-) diff --git a/modules/10-basics/10-hello-world/en/README.md b/modules/10-basics/10-hello-world/en/README.md index 2b4a635c..4828fe0a 100644 --- a/modules/10-basics/10-hello-world/en/README.md +++ b/modules/10-basics/10-hello-world/en/README.md @@ -31,16 +31,6 @@ console.log("it's JavaScript"); // an apostrophe inside double quotes is an ordi console.log('He said "No"'); // double quotes inside, so single quotes outside ``` -The outer quotes can also stay as they are: the inner one is marked with a backslash `\`, and then it no longer ends the string. This is called escaping. - - - -```text -console.log('it\'s JavaScript'); // the apostrophe is escaped, the string continues -``` - -The formatter rewrites this form with quotes and no backslash, so you rarely see it in finished code. It is needed when a string contains both kinds of quotes at once. - ## The meaning of symbols Code consists of commands, and each of them must be written in a specific form. Besides letters, quotes `'` and `"`, parentheses `()`, and punctuation marks are important in code. A missing or mixed-up sign will cause the program not to run. Try to determine what error was made in each of the lines? diff --git a/modules/10-basics/10-hello-world/es/README.md b/modules/10-basics/10-hello-world/es/README.md index a39e6474..632c8c27 100644 --- a/modules/10-basics/10-hello-world/es/README.md +++ b/modules/10-basics/10-hello-world/es/README.md @@ -33,16 +33,6 @@ console.log("it's JavaScript"); // un apóstrofo dentro de comillas dobles es un console.log('Él dijo "No"'); // comillas dobles dentro, por eso las exteriores son simples ``` -Las comillas exteriores también se pueden dejar como están: la de dentro se marca con una barra invertida `\` y entonces ya no termina la cadena. Esto se llama escapado. - - - -```text -console.log('it\'s JavaScript'); // el apóstrofo está escapado, la cadena continúa -``` - -El formateador reescribe esa forma con comillas sin barra, así que en el código terminado se ve pocas veces. Sirve cuando la cadena contiene los dos tipos de comillas a la vez. - ## El significado de los símbolos El código está formado por comandos, y cada uno de ellos debe escribirse de una forma determinada. Además de las letras, en el código son importantes las comillas `'` y `"`, los paréntesis `()` y los signos de puntuación. Un signo omitido o confundido hará que el programa no se ejecute. ¿Puedes intentar determinar qué error se cometió en cada una de las líneas? diff --git a/modules/10-basics/10-hello-world/ru/README.md b/modules/10-basics/10-hello-world/ru/README.md index ce7b0b5b..c705349c 100644 --- a/modules/10-basics/10-hello-world/ru/README.md +++ b/modules/10-basics/10-hello-world/ru/README.md @@ -33,16 +33,6 @@ console.log("it's JavaScript"); // апостроф внутри двойных console.log('Он сказал "Нет"'); // двойные кавычки внутри, поэтому снаружи одинарные ``` -Внешние кавычки можно и не менять: внутреннюю помечают обратным слэшем `\`, и тогда она не обрывает строку. Это называется экранированием. - - - -```text -console.log('it\'s JavaScript'); // апостроф экранирован, строка продолжается -``` - -Форматтер такую запись переписывает на кавычки без слэша, поэтому в готовом коде она встречается редко. Пригодится она тогда, когда в строке есть оба вида кавычек сразу. - ## Значение символов Код состоит из команд, и каждая из них должна быть написана в определенной форме. Помимо букв, в коде важны кавычки `'` и `"`, скобки `()` и знаки препинания. Пропущенный или перепутанный знак приведет к тому, что программа не запустится. Попробуйте определить, какую ошибку допустили в каждой из строк?