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
Функции. | |
Reference для изучения - https://learn.javascript.ru/function-basics | |
1. const | |
arg1 = 2; | |
arg2 = 5; | |
arg3 = 17; | |
1.1 Написать функцию getSum которая принимает 2 аргумента arg1, arg2 и возвращает ее Сумму | |
1.2 Написать функцию getDiff которая принимает 2 аргумента arg1, arg2 и возвращает ее Разность |
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
Массивы. Это первая пачка задачи по массивам. Уровень - легкий | |
arr - исходный массив. | |
Reference для изучения - https://learn.javascript.ru/array | |
https://learn.javascript.ru/array-methods | |
1. | |
const arr = [1,2,3,4,5,6,7,8]; | |
1.1 const firstItem = ? - Первый элемент из массива | |
1.2 const lastItem = ? - Последний элемент массива | |
1.3 Добавить число 100500 в начало массива |