-
Notifications
You must be signed in to change notification settings - Fork 179
Function object, NFE #198
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
Merged
tarasyyyk
merged 22 commits into
javascript-tutorial:master
from
MykolaSopiha:function-object
Sep 13, 2021
Merged
Function object, NFE #198
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
8a5ab06
function-object
MykolaSopiha b4c9f9f
function-object
MykolaSopiha 7e792a6
function-object
MykolaSopiha 836c408
function-object
MykolaSopiha f84c353
function-object
MykolaSopiha 76ba9df
function-object
MykolaSopiha 8ea92d8
function-object
MykolaSopiha 848a163
function-object
MykolaSopiha e5d98d8
Update 1-js/06-advanced-functions/06-function-object/2-counter-inc-de…
MykolaSopiha d53d5f9
Update 1-js/06-advanced-functions/06-function-object/5-sum-many-brack…
MykolaSopiha fb61ef8
Update 1-js/06-advanced-functions/06-function-object/5-sum-many-brack…
MykolaSopiha 8c438ff
Update 1-js/06-advanced-functions/06-function-object/5-sum-many-brack…
MykolaSopiha fa8ae01
Update 1-js/06-advanced-functions/06-function-object/article.md
MykolaSopiha b9602bd
Update 1-js/06-advanced-functions/06-function-object/article.md
MykolaSopiha bf2f942
Update 1-js/06-advanced-functions/06-function-object/5-sum-many-brack…
MykolaSopiha 3f73e08
Update 1-js/06-advanced-functions/06-function-object/article.md
MykolaSopiha 0d08ac0
function-object
MykolaSopiha 8f2a963
Merge branch 'function-object' of github.com:MykolaSopiha/uk.javascri…
MykolaSopiha 177060e
function-object
MykolaSopiha 2231004
function-object
MykolaSopiha 9e1033e
Update 1-js/06-advanced-functions/06-function-object/5-sum-many-brack…
tarasyyyk bde190b
Update 1-js/06-advanced-functions/06-function-object/5-sum-many-brack…
tarasyyyk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
1-js/06-advanced-functions/06-function-object/2-counter-inc-dec/solution.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
|
||
The solution uses `count` in the local variable, but addition methods are written right into the `counter`. They share the same outer lexical environment and also can access the current `count`. | ||
В рішенні використовується `count` у локальній змінній, але методи додавання записуються прямо в `counter`. Вони поділяють таке ж зовнішнє лексичне середовище, а також можуть отримати доступ до поточного `count`. |
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
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
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -2,9 +2,9 @@ importance: 2 | |||||
|
||||||
--- | ||||||
|
||||||
# Sum with an arbitrary amount of brackets | ||||||
# Сума з довільною кількістю дужок | ||||||
|
||||||
Write function `sum` that would work like this: | ||||||
Напишіть функцію `sum`, яка б працювала так: | ||||||
|
||||||
```js | ||||||
sum(1)(2) == 3; // 1 + 2 | ||||||
|
@@ -14,4 +14,4 @@ sum(6)(-1)(-2)(-3) == 0 | |||||
sum(0)(1)(2)(3)(4)(5) == 15 | ||||||
``` | ||||||
|
||||||
P.S. Hint: you may need to setup custom object to primitive conversion for your function. | ||||||
P.S. Підказка: вам може знадобитися налаштувати кастомний об'єкт, щоб конвертувати примітиви для вашої функції. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.