Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lesson 6 #73

Open
wants to merge 46 commits into
base: lesson-6
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
471178c
added homework for lesson 1
andrey-shostik Apr 2, 2018
b7a1568
Merge pull request #3 from andrey-shostik/patch-1
andrey-shostik Apr 2, 2018
af5f6fd
added js tasks
andrey-shostik Apr 2, 2018
8c52edd
Add index.html and main.js
TereschenkoVlad Apr 5, 2018
3ba3d1f
minor changes in main.js
TereschenkoVlad Apr 6, 2018
5a798b2
improve first and last gunction
TereschenkoVlad Apr 6, 2018
4e7446a
Delete watcherTasks.xml
TereschenkoVlad Apr 6, 2018
9d45e60
last improvement of functions
TereschenkoVlad Apr 7, 2018
f5ea3a1
Add gitignore
TereschenkoVlad Apr 7, 2018
0ddb517
final commit
TereschenkoVlad Apr 10, 2018
051de9b
Merge branch 'lesson-1' of https://github.com/TereschenkoVlad/JS-cour…
TereschenkoVlad Apr 10, 2018
8b61ee8
Add index.html and main.js with homework#3
TereschenkoVlad Apr 16, 2018
1d98701
edit gitignore
TereschenkoVlad Apr 16, 2018
09deb10
Delete main.js
TereschenkoVlad Apr 16, 2018
1bc4d1b
Delete index.html
TereschenkoVlad Apr 16, 2018
19cf123
improve task 3 in main.js
TereschenkoVlad Apr 17, 2018
0528872
improve task 3 in main.js
TereschenkoVlad Apr 17, 2018
ad18d94
Merge branch 'lesson-3' of https://github.com/TereschenkoVlad/JS-cour…
TereschenkoVlad Apr 17, 2018
6b281c2
Fixed filter in task 3
TereschenkoVlad Apr 19, 2018
59bd598
fixed little mistake in task 4
TereschenkoVlad Apr 19, 2018
9a3f8a9
Fixed after checked homework
TereschenkoVlad Apr 25, 2018
70d22e6
Posted function in the new standard of internal sort
TereschenkoVlad Apr 25, 2018
a2cd9cd
Revert "Posted function in the new standard of internal sort"
TereschenkoVlad May 14, 2018
c54ec73
add task#6
TereschenkoVlad May 14, 2018
f694ffa
Revert "add task#6"
TereschenkoVlad May 14, 2018
47ec23b
Revert "Revert "add task#6""
TereschenkoVlad May 14, 2018
4aca8d9
Revert "Revert "Revert "add task#6"""
TereschenkoVlad May 14, 2018
bb733ed
Revert "Revert "Revert "Revert "add task#6""""
TereschenkoVlad May 14, 2018
3b71689
Revert "Revert "Revert "Revert "Revert "add task#6"""""
TereschenkoVlad May 14, 2018
dffc3c1
Revert "Revert "Revert "Revert "Revert "Revert "add task#6""""""
TereschenkoVlad May 14, 2018
f6e6fca
Revert "Revert "Revert "Revert "Revert "Revert "Revert "add task#6"""…
TereschenkoVlad May 14, 2018
70f3e7b
Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "add t…
TereschenkoVlad May 14, 2018
577a805
Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "Rever…
TereschenkoVlad May 14, 2018
a2dcd04
Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "Rever…
TereschenkoVlad May 14, 2018
875e794
Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "Rever…
TereschenkoVlad May 14, 2018
82eb5ae
Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "Rever…
TereschenkoVlad May 14, 2018
19c99bf
Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "Rever…
TereschenkoVlad May 14, 2018
4b972dc
Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "Rever…
TereschenkoVlad May 14, 2018
a9c2d4b
Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "Rever…
TereschenkoVlad May 14, 2018
50e29a6
Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "Rever…
TereschenkoVlad May 14, 2018
30febbc
Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "Rever…
TereschenkoVlad May 14, 2018
b1811aa
Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "Rever…
TereschenkoVlad May 14, 2018
4ab7cd5
Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "Rever…
TereschenkoVlad May 14, 2018
93501b3
Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "Rever…
TereschenkoVlad May 14, 2018
975c09b
Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "Rever…
TereschenkoVlad May 14, 2018
a68063f
some changes
TereschenkoVlad May 15, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea/
VladTereshchenko_1/
10 changes: 10 additions & 0 deletions Lesson-6/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Lesson-6</title>
</head>
<body>
<script src="main.js"></script>
</body>
</html>
48 changes: 48 additions & 0 deletions Lesson-6/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
//
//
// task #1
function sumArguments(value) {
return secondValue => nextValue => value + secondValue + nextValue;
}
console.log(sumArguments(1)(2)(3) === 6);
//
//
// task #2.1
function sumArg(value) {
return nextValue => nextValue ? sumArg(value + nextValue) : value;
}
console.log(sumArg(1)(2)(3)(4)(5)() === 15);
//
//
// task #2.2
function secondSumArg(value) {
const totalSum = nextValue => secondSumArg(value + nextValue);
totalSum.toString = () => value;
return totalSum;
}
alert(secondSumArg(1)(2)(3)(4)(5)(6));
//
//
// task #3
function makeCounter() {
let initialValue = 0;

const counter = () => ++initialValue;

counter.set = (value) => {
initialValue = --value;
};
counter.reset = () => {
initialValue = 0;
};

return counter;
}

const counter = makeCounter();
console.log(counter()); // 1
console.log(counter()); // 2
counter.set(12);
console.log(counter()); // 12
counter.reset();
console.log(counter()); // 1
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
# JS-courses
# JS-courses
1. Ознакомиться с GIT
2. Ознакомиться с GitHub
3. Форкнуть репозиторий
4. Добавить index.html
5. Создать пулл реквест

## GIT
[Основы GIT](https://git-scm.com/book/ru/v1/%D0%92%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5-%D0%9E-%D0%BA%D0%BE%D0%BD%D1%82%D1%80%D0%BE%D0%BB%D0%B5-%D0%B2%D0%B5%D1%80%D1%81%D0%B8%D0%B9)

[Github help](https://help.github.com/)

[Видеокурс](https://www.youtube.com/watch?v=PEKN8NtBDQ0)

## JS
[Основы JS](https://learn.javascript.ru/first-steps)


## JS задачи
1. реализовать функцию которая вернет сумму элементов произвольного массива
2. реализовать функцию которая принимает произвольный массив и возвращает отсортированный по возростанию, сделать двумя способами, через метод sort и через цикл for
3. реализовать функцию которая возвращает массив с уникальными элементами // [1,1,2,3,1,2] => [1,2,3]
4. реализовать функцию которая возвращает массив с числами фибоначчи, количество которых зависит от переданного значения при вызове функции