feat(40-define-functions): полный перенос теории из Python и адаптация под JS#816
Merged
Merged
Conversation
Расширена теория уроков 100-define, 150-return, 340-default до объёма
Python-оригинала с адаптацией под JavaScript:
- def → function, отступы Python → тело в {} и принцип «определить ≠
вызвать»;
- 150-return: убран преждевременный if (условные конструкции изучаются
позже, в модуле 48); добавлены возврат выражения, многострочные
функции, «код после return»;
- 340-default: повторение строки через str.repeat() вместо умножения,
примеры joinWords/makeLine/getHiddenCard.
Уроки 320-parameters и 450-short-syntax (оригинальный JS-контент про
стрелочные функции) и все задания не тронуты. named-arguments и
type-annotations не переносятся; modules/packages отложены.
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.
Что сделано
Полный перенос модуля 40-define-functions (Определение функций) из Python (RU-локаль): расширена теория трёх уроков, которые были урезаны (from-python импорт).
Адаптация под JS
def→function; питоновские отступы → тело в{}; раздел «определить ≠ вызвать»; примерprintAverage; краткое упоминание стрелочных функций.if(getSign) — условные конструкции изучаются позже (модуль 48). Вместо него — возврат вычисленного выражения (fullName), многострочные функции (formatNameчерезtrim/toUpperCase) и раздел «код после return» без условий.str.repeat()вместо питоновского умноженияtext * times; примерыjoinWords,makeLine,getHiddenCard.Не тронуто
320-define-functions-parametersи450-define-functions-short-syntax— оригинальный JS-контент (стрелочные функции, параметры).250-named-argumentsи300-type-annotationsне переносятся (питон-специфика);350-modules/400-packagesотложены.Проверки
vitest— 5/5 проходят.biome check— exit 0.🤖 Generated with Claude Code