feat(exercises): выравнивание заданий JS под Python в похожих уроках#822
Merged
Conversation
Приведены задания JS к питоновским постановкам там, где они расходились: - 50-loops/70-for: encrypt → FizzBuzz - 50-loops/55-return-from-loops: hasChar → hasAtSymbol (поиск @) - 50-loops/23-aggregation-strings: joinNumbersFromRange → sanitizePhoneNumber - 50-loops/25-iteration-over-string: printReversed → maskCardNumber - 50-loops/20-aggregation-numbers: multiply → calculateElectricityBill (тариф) - 31-advanced-strings/30-symbols: последний символ → сбор слова по индексам - 48-conditionals/50-else-if: + ветка 'unknown', значения как в Python - 48-conditionals/60-ternary-operator: convertText → flipFlop - 10-basics/40-instructions: 3 имени → статус доставки - 30-variables/11-change: переопределение заранее заданной переменной - 40-define-functions/100: printMotto → sayHello (без ручного вызова) - 35-calling-functions/135: toFixed(2) → расчёт поездки (toFixed 1/2/0) Структурные различия (.lower в methods, truncate в parameters) и удачные JS-идиомы (getLetter) намеренно не трогались. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Конкатенация text[10] + text[8] + ... падала на tsc (TS2532) из-за strict + noUncheckedIndexedAccess: индексация строки даёт string | undefined, а сложение двух таких значений через + не допускается. Склейка через шаблонный литерал (идиома курса) принимает string | undefined без ошибок. Результат прежний — grip. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Что сделано
По результатам поурочного сравнения заданий приведены задачи JS к питоновским постановкам там, где они расходились по сути (группа A из триажа). Меняли
ru/EXERCISE.md+index.js+test.js.@, ранний return)gripпо индексамunknownАдаптация под JS
round(n, ndigits)→toFixed(d)(в т.ч.toFixed()без аргумента = 0 знаков).'#' * nнет — агрегация строк циклом; проверка символа через' ()-'.includes(ch).%и условия — они уже пройдены (модуль 48 < 50).Намеренно НЕ трогали
38/200-properties-methods,truncateуже в40/320-define-functions-parameters.45/70-logical-expressions(getLetterчерез|| ''— про truthy/falsy),33/50-weak-typing(то же выражение).Проверки
vitest— 17/17 (включая все изменённые уроки).biome check— exit 0.🤖 Generated with Claude Code