javascript-tutorial / javascript-tutorial/en.javascript.info
Suggestion. Task for 'Iterables' article
還沒有人認領這個 Issue。
- 主要語言
- HTML
- 星號
- 25.5k
- 分支
- 4k
- PR 合併指標
- 30 天內沒有已合併 PR
描述
It would be useful to have some practice tasks with realization of concepts in article [Iterables](https://javascript.info/iterable).
An idea of task is in the article: "make an iterable object that generates an infinite sequence of pseudorandom numbers".
Possible solution:
```
let randomObj = {
min: 10,
max: 100,
}
randomObj[Symbol.iterator] = function() {
return {
start: this.min,
end: this.max,
next() {
return {
done: false,
value: Math.random() * (this.end - this.start) + this.start,
};
}
}
}
const THRESHOLD = 20;
for (let value of randomObj) {
alert(value); // show random generated value
if (value < THRESHOLD) break;
}
````
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先閱讀連結的 Iterables 文章及其現有的練習結構。以提議的無限偽隨機數 iterable 作為任務參考,然後檢查教學課程的其他部分如何組織實作任務。完成的標準是:文章包含適當的實作任務,並提供清楚的題目說明和解決方案指引。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript
- 領域
- documentation
- Issue 類型
- 文件
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100