Skip to content

Commit deb3c1e

Browse files
committed
Improve task texts
1 parent 8c542b3 commit deb3c1e

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

JavaScript/Tasks/1-promisify-problem.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
'use strict';
22

3-
// Task: implement cancel passing `timeout` as an option
4-
// to promisified function (last argiment instead of callback)
3+
// Task: implement a cancelable promise by passing `timeout: number`
4+
// as an option to the promisified function (last argument,
5+
// replacing the callback).
56

67
const promisify = (fn) => (...args) => {
78
const promise = new Promise((resolve, reject) => {

JavaScript/Tasks/2-abort-problem.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
// Task: implement cancel passing `AbortSignal` as an option
4-
// to promisified function (last argiment instead of callback)
5-
// Hint: create `AbortController` or `AbortSignal` in usage section
3+
// Task: implement cancellation by passing `AbortSignal` as an option
4+
// to the promisified function (last argument, replacing the callback).
5+
// Hint: Create `AbortController` or `AbortSignal` in the usage section.
66

77
const promisify = (fn) => (...args) => {
88
const promise = new Promise((resolve, reject) => {

JavaScript/Tasks/3-iterator-problem.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
'use strict';
22

3-
// Task: In usage section we have 3 blocks of code (in iife wrappers)
4-
// with async iterators generated from single `Timer` instance.
5-
// The prombem is: first and second blocks does not iterate,
6-
// just last one works as of now. Fix this to allow all blocks iterate
7-
// in parallel.
3+
// Task: ensure all blocks of code in the usage section iterate in parallel.
4+
// Currently, only the last block (of 3) works. Fix this issue so that
5+
// all blocks can iterate concurrently using a single `Timer` instance.
86

97
class Timer {
108
#counter = 0;

JavaScript/Tasks/4-hardcode-problem.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
// Task: refactor `Timer` to make event name (`step` in example)
4-
// configurable (not hardcoded into `Timer`)
5-
// Hint: you need Node.js >= v19.0.0
3+
// Task: refactor `Timer` to make the event name configurable
4+
// (e.g., 'step' in the example) and not hardcoded into the `Timer`.
5+
// Hint: You need Node.js >= v19.0.0
66

77
class Timer extends EventTarget {
88
#counter = 0;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy