diff --git a/modules/35-calling-functions/350-stdlib/Makefile b/modules/35-calling-functions/350-stdlib/Makefile deleted file mode 100644 index d0d0a48c..00000000 --- a/modules/35-calling-functions/350-stdlib/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -test: - @ test.sh diff --git a/modules/35-calling-functions/350-stdlib/description.es.yml b/modules/35-calling-functions/350-stdlib/description.es.yml deleted file mode 100644 index 36df55e5..00000000 --- a/modules/35-calling-functions/350-stdlib/description.es.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- - -name: Biblioteca estándar -theory: | - - JavaScript, al igual que cualquier otro lenguaje, viene con un conjunto de funciones útiles. Todas juntas forman lo que se conoce como la **biblioteca estándar**. Por lo general, incluye miles de funciones que no se pueden aprender todas, y no es necesario hacerlo. Se supone que cualquier programador sabe dónde buscar la documentación y tiene una idea aproximada de lo que quiere lograr. A partir de ahí, es sólo cuestión de técnica. Si se les quita internet a los programadores, la mayoría no podrá programar nada. - - Para los principiantes, esta información a menudo parece: "Ve allí, no sé dónde, trae eso, no sé qué". Es decir, no está claro cómo aprender sobre estas funciones cuando no sabes nada en absoluto. Curiosamente, no hay forma de conocer todo lo que necesitas conocer de una vez por todas. Cada desarrollador, a medida que crece profesionalmente, se familiariza con funciones cada vez más interesantes que resuelven sus problemas de manera más elegante, y así enriquece su arsenal. - - Aquí hay algunos consejos sobre cómo aprender sobre nuevas funciones: - - * Siempre sigue claramente con qué estás trabajando (qué tipo de datos). Casi siempre encontrarás la función necesaria en la sección correspondiente de la documentación, por ejemplo, para trabajar con cadenas, debes estudiar las funciones de cadena. - * Abre periódicamente la sección de funciones estándar relacionadas con el tema que estás estudiando y simplemente revísalas, estudiando las firmas y formas de uso. - * Lee el código de otras personas con más frecuencia, especialmente el código de las bibliotecas que estás utilizando. Todo está disponible en GitHub. - - JavaScript tiene sus peculiaridades en cuanto a la estructura de la biblioteca estándar. Dado que su código puede ejecutarse en diferentes entornos, como el del servidor o el navegador, las capacidades de la biblioteca estándar dependen en gran medida de la forma en que se utiliza. Por ejemplo, desde el navegador no se pueden realizar algunas tareas que se deben poder realizar en el servidor. La documentación para la parte del servidor debe consultarse en el sitio web https://nodejs.org. Las partes del servidor de la biblioteca estándar están organizadas en módulos, cada módulo tiene su propia página con la descripción de todas las funciones que contiene. Por ejemplo, el módulo [fs](https://nodejs.org/api/fs.html) se utiliza para trabajar con el sistema de archivos, a través de sus funciones se realizan la escritura y lectura de archivos. - - Si hablamos del navegador, en general hay muy pocas cosas. En su mayoría son algunas funciones básicas incorporadas en el propio lenguaje, como las mismas [funciones](https://developer.mozilla.org/es/docs/Web/JavaScript/Reference/Global_Objects/Math) para trabajar con matemáticas. El resto de las capacidades se agregan mediante el uso de bibliotecas de terceros. - -instructions: | - - El operador `typeof` permite determinar el tipo del operando pasado. El nombre del tipo se devuelve como una cadena. Por ejemplo, llamar a `typeof 'go go go'` devolverá la cadena `'string'` (number - número). - - ```javascript - console.log(typeof 3); // => 'number' - ``` - - Muestra en la pantalla el tipo del valor de la constante `motto`. - -tips: - - | - [Descripción de las funciones de cadena](https://developer.mozilla.org/es/docs/Web/JavaScript/Reference/Global_Objects/String) - - | - [Cómo buscar información técnica](https://guides.hexlet.io/es/how-to-search/) - -definitions: - - name: Biblioteca estándar - description: conjunto de funciones útiles que se incluyen con el lenguaje de programación. diff --git a/modules/35-calling-functions/350-stdlib/en/EXERCISE.md b/modules/35-calling-functions/350-stdlib/en/EXERCISE.md deleted file mode 100644 index 8dc951e5..00000000 --- a/modules/35-calling-functions/350-stdlib/en/EXERCISE.md +++ /dev/null @@ -1,8 +0,0 @@ - -The `typeof` operator defines the type of the operand. The type name returns as a string. For example, calling `typeof 'go go go'` will return the string `'string'`. - -```javascript -console.log(typeof 3); // => 'number' -``` - -Print the type of the value of the constant `motto`. diff --git a/modules/35-calling-functions/350-stdlib/en/README.md b/modules/35-calling-functions/350-stdlib/en/README.md deleted file mode 100644 index 35330d03..00000000 --- a/modules/35-calling-functions/350-stdlib/en/README.md +++ /dev/null @@ -1,14 +0,0 @@ - -Like any other language, JavaScript comes with a set of useful functions. All together they make up the so-called **standard library**. It usually contains thousands of functions you can't remember, and you don't have to. It is assumed that any programmer knows where to look for their documentation and has a rough idea of what they want to achieve. And the rest is a matter of technique. Without the Internet, most programmers wouldn't be able to program anything. - -To newcomers, it often looks like this: "Go I know not whither and fetch I know not what". In other words, most people have no idea how to learn about these functions when they don't know anything at all. Oddly enough, there is no way to know everything you need to know once and for all. As you grow as a developer, you learn all the exciting features that solve your problems more elegantly, thus expanding your toolbox. - -Here are some tips to learn about new features: - -* Always keep track of what you are working with (the data type) at the moment. You will most likely find the function you need in the appropriate chapter of the documentation. For example, you need to study string functions to work with strings -* From time to time, open the standard functions section of the topic you are studying and just run through them, learning the signatures and ways to use them -* Read other people's code more often, especially code from the libraries you're using. It's all available on GitHub - -The JavaScript standard library's structure has its peculiarities. Since the code can run in different environments, such as a server or a browser, the capabilities of the standard library are highly dependent on the use case. For example, you can't perform some server tasks in a browser. For server-side documentation, see https://nodejs.org. The server portions of the standard library are organized into modules, each module has its own page with full descriptions of all its functions. In particular, the module [fs](https://nodejs.org/api/fs.html) is required to work with the file system, its functions allow you to write and read files. - -As for the browsers, there's not much stuff. For the most part, it's some basic functions built into the language. For example, the math [functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math) we've seen before. The rest of the features you can add via third-party libraries. diff --git a/modules/35-calling-functions/350-stdlib/en/data.yml b/modules/35-calling-functions/350-stdlib/en/data.yml deleted file mode 100644 index ecacbfe5..00000000 --- a/modules/35-calling-functions/350-stdlib/en/data.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -name: Standard library -tips: - - > - [String functions - docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) - - > - [How to search for technical - information](https://guides.hexlet.io/how-to-search/) -definitions: - - name: Standard library - description: is a set of useful features bundled in the programming language. diff --git a/modules/35-calling-functions/350-stdlib/es/EXERCISE.md b/modules/35-calling-functions/350-stdlib/es/EXERCISE.md deleted file mode 100644 index 951ca4a4..00000000 --- a/modules/35-calling-functions/350-stdlib/es/EXERCISE.md +++ /dev/null @@ -1,8 +0,0 @@ - -El operador `typeof` permite determinar el tipo del operando pasado. El nombre del tipo se devuelve como una cadena. Por ejemplo, llamar a `typeof 'go go go'` devolverá la cadena `'string'` (number - número). - -```javascript -console.log(typeof 3); // => 'number' -``` - -Muestra en la pantalla el tipo del valor de la constante `motto`. diff --git a/modules/35-calling-functions/350-stdlib/es/README.md b/modules/35-calling-functions/350-stdlib/es/README.md deleted file mode 100644 index e692a14d..00000000 --- a/modules/35-calling-functions/350-stdlib/es/README.md +++ /dev/null @@ -1,14 +0,0 @@ - -JavaScript, al igual que cualquier otro lenguaje, viene con un conjunto de funciones útiles. Todas juntas forman lo que se conoce como la **biblioteca estándar**. Por lo general, incluye miles de funciones que no se pueden aprender todas, y no es necesario hacerlo. Se supone que cualquier programador sabe dónde buscar la documentación y tiene una idea aproximada de lo que quiere lograr. A partir de ahí, es sólo cuestión de técnica. Si se les quita internet a los programadores, la mayoría no podrá programar nada. - -Para los principiantes, esta información a menudo parece: "Ve allí, no sé dónde, trae eso, no sé qué". Es decir, no está claro cómo aprender sobre estas funciones cuando no sabes nada en absoluto. Curiosamente, no hay forma de conocer todo lo que necesitas conocer de una vez por todas. Cada desarrollador, a medida que crece profesionalmente, se familiariza con funciones cada vez más interesantes que resuelven sus problemas de manera más elegante, y así enriquece su arsenal. - -Aquí hay algunos consejos sobre cómo aprender sobre nuevas funciones: - -* Siempre sigue claramente con qué estás trabajando (qué tipo de datos). Casi siempre encontrarás la función necesaria en la sección correspondiente de la documentación, por ejemplo, para trabajar con cadenas, debes estudiar las funciones de cadena. -* Abre periódicamente la sección de funciones estándar relacionadas con el tema que estás estudiando y simplemente revísalas, estudiando las firmas y formas de uso. -* Lee el código de otras personas con más frecuencia, especialmente el código de las bibliotecas que estás utilizando. Todo está disponible en GitHub. - -JavaScript tiene sus peculiaridades en cuanto a la estructura de la biblioteca estándar. Dado que su código puede ejecutarse en diferentes entornos, como el del servidor o el navegador, las capacidades de la biblioteca estándar dependen en gran medida de la forma en que se utiliza. Por ejemplo, desde el navegador no se pueden realizar algunas tareas que se deben poder realizar en el servidor. La documentación para la parte del servidor debe consultarse en el sitio web https://nodejs.org. Las partes del servidor de la biblioteca estándar están organizadas en módulos, cada módulo tiene su propia página con la descripción de todas las funciones que contiene. Por ejemplo, el módulo [fs](https://nodejs.org/api/fs.html) se utiliza para trabajar con el sistema de archivos, a través de sus funciones se realizan la escritura y lectura de archivos. - -Si hablamos del navegador, en general hay muy pocas cosas. En su mayoría son algunas funciones básicas incorporadas en el propio lenguaje, como las mismas [funciones](https://developer.mozilla.org/es/docs/Web/JavaScript/Reference/Global_Objects/Math) para trabajar con matemáticas. El resto de las capacidades se agregan mediante el uso de bibliotecas de terceros. diff --git a/modules/35-calling-functions/350-stdlib/es/data.yml b/modules/35-calling-functions/350-stdlib/es/data.yml deleted file mode 100644 index 2ddd88b4..00000000 --- a/modules/35-calling-functions/350-stdlib/es/data.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: Biblioteca estándar -tips: - - > - [Descripción de las funciones de - cadena](https://developer.mozilla.org/es/docs/Web/JavaScript/Reference/Global_Objects/String) - - > - [Cómo buscar información - técnica](https://guides.hexlet.io/es/how-to-search/) -definitions: - - name: Biblioteca estándar - description: >- - conjunto de funciones útiles que se incluyen con el lenguaje de - programación. diff --git a/modules/35-calling-functions/350-stdlib/index.js b/modules/35-calling-functions/350-stdlib/index.js deleted file mode 100644 index b64fdd83..00000000 --- a/modules/35-calling-functions/350-stdlib/index.js +++ /dev/null @@ -1,5 +0,0 @@ -const motto = 'Family, Duty, Honor'; - -// BEGIN -console.log(typeof motto); -// END diff --git a/modules/35-calling-functions/350-stdlib/ru/EXERCISE.md b/modules/35-calling-functions/350-stdlib/ru/EXERCISE.md deleted file mode 100644 index 390fc484..00000000 --- a/modules/35-calling-functions/350-stdlib/ru/EXERCISE.md +++ /dev/null @@ -1,8 +0,0 @@ - -Оператор `typeof` позволяет определить тип передаваемого операнда. Название типа возвращается в виде строки. Например, вызов `typeof 'go go go'` вернёт строку `'string'` (number — число). - -```javascript -console.log(typeof 3); // => 'number' -``` - -Выведите на экран тип значения константы `motto`. diff --git a/modules/35-calling-functions/350-stdlib/ru/README.md b/modules/35-calling-functions/350-stdlib/ru/README.md deleted file mode 100644 index 4546b787..00000000 --- a/modules/35-calling-functions/350-stdlib/ru/README.md +++ /dev/null @@ -1,14 +0,0 @@ - -JavaScript, как и любой другой язык, поставляется с набором полезных функций. Все вместе они составляют так называемую **стандартную библиотеку**. В неё обычно входят тысячи функций, которые невозможно выучить — этого и не нужно делать. Подразумевается, что любой программист знает, где искать документацию по ним и примерно представляет себе, чего он хочет достичь. А дальше — дело техники. Если отнять у программистов интернет, то большинство не сможет ничего запрограммировать. - -Для новичков эта информация часто выглядит так: «Сходи туда, не знаю куда, принеси то, не знаю что». То есть непонятно, как узнавать про эти функции, когда ты ничего не знаешь вообще. Как ни странно, не существует способа раз и навсегда познать всё, что нужно познать. Любой разработчик в процессе своего профессионального взросления знакомится со всё более интересными функциями, решающими его задачи более элегантно, и таким образом пополняет свой арсенал. - -Вот некоторые советы, как узнавать о новых функциях: - -* Всегда чётко отслеживайте, с чем вы сейчас работаете (какой тип данных). Почти всегда вы найдете необходимую функцию в соответствующем разделе документации — например, для работы со строками нужно изучать строковые функции. -* Периодически открывайте раздел со стандартными функциями по изучаемой тематике и просто пробегайтесь по ним, изучая сигнатуры и способы использования. -* Чаще читайте чужой код, особенно код библиотек, которые вы используете. Он весь доступен на GitHub. - -У JavaScript есть свои особенности по структуре стандартной библиотеки. Так как его код может исполняться в разных средах, таких как серверное окружение или браузер, то возможности стандартной библиотеки сильно зависят от варианта использования. Например, из браузера невозможно выполнять некоторые задачи, которые необходимо уметь выполнять на сервере. Документацию по серверной части необходимо смотреть на сайте https://nodejs.org. Серверные части стандартной библиотеки организованы в модули, у каждого модуля есть своя страница с описанием всех функций, находящихся внутри него. Например, модуль [fs](https://nodejs.org/api/fs.html) необходим для работы с файловой системой, через его функции происходит запись и чтение файлов. - -Если говорить про браузер, то там вообще мало что есть. По большей части это какие-то базовые функции, встроенные в сам язык — например те же [функции](https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Math) для работы с математикой. Остальные возможности добавляются через использование сторонних библиотек. diff --git a/modules/35-calling-functions/350-stdlib/ru/data.yml b/modules/35-calling-functions/350-stdlib/ru/data.yml deleted file mode 100644 index 64882b99..00000000 --- a/modules/35-calling-functions/350-stdlib/ru/data.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: Стандартная библиотека -tips: - - > - [Описание строковых - функций](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) - - > - [Как искать техническую - информацию](https://guides.hexlet.io/ru/how-to-search/) -definitions: - - name: Стандартная библиотека - description: >- - набор полезных функций, входящий в комплект поставки языка - программирования. diff --git a/modules/35-calling-functions/350-stdlib/test.js b/modules/35-calling-functions/350-stdlib/test.js deleted file mode 100644 index 2d4b9f29..00000000 --- a/modules/35-calling-functions/350-stdlib/test.js +++ /dev/null @@ -1,12 +0,0 @@ -// @ts-check - -import { expect, test, vi } from 'vitest'; - -test('hello world', async () => { - const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); - await import('./index.js'); - - const firstArg = consoleLogSpy.mock.calls.join('\n'); - - expect(firstArg).toBe('string'); -});