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

Homework 4 #479

Open
markoffden opened this issue Nov 21, 2018 · 0 comments
Open

Homework 4 #479

markoffden opened this issue Nov 21, 2018 · 0 comments

Comments

@markoffden
Copy link
Contributor

markoffden commented Nov 21, 2018

Task 1

Create a function logNumbers() which accepts one argument of type ‘number’.
After one second log into console this number + 10.
After two seconds log into console previous step result * 3.
After three seconds log into console previous step result - 20.
Provide callback, Promise and async/await based solution.

Task 2 (optional, only if you get bored)

fetch() is cool for HTTP requests. It’s Promise-based and has lots of options. But as Promise resolves/rejects only once and stays immutable, we cannot use it for reporting file upload progress purposes (PUT). Create a function which would utilize Promise mechanism providing a possible solution for this.

Hint: this function will not use fetch()

===

Slides are here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant