INDAPlus21 / INDAPlus21/dpeilitz-task-12

Pass

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

**Well done David!**

But no README file? No instructions. No NodeJS start script? I guess I just have to take your word for it:
![](https://github.com/INDAPlus21/dpeilitz-task-12/blob/main/Proof%20of%20idiocy.PNG?raw=true)

Not to be picky, but why all the spagetti(?); why the missing documentation? Me sad.

Note the unnecessary branching:
```js
selected.onchange = function() {
let x = document.getElementById("selection").value;
if (x == "circles"){
c.clearRect(0, 0, canvas.width, canvas.height);
drawCircle(canvas.width/2, canvas.height/2, canvas.height/2);
}
if (x == "cantor"){
c.clearRect(0, 0, canvas.width, canvas.height);
cantor(0, canvas.height/2, canvas.width);
}
if (x == "trees"){
c.clearRect(0, 0, canvas.width, canvas.height);
trees(canvas.width/2, canvas.height, 0, canvas.height/4, 10);
}
}
```

_With only one branch_:
```js
selected.onchange = () => {
c.clearRect(0, 0, canvas.width, canvas.height);
let x = document.getElementById("selection").value;
switch (x) {
case "circles":
drawCircle(canvas.width/2, canvas.height/2, canvas.height/2);
break;
case "cantor":
cantor(0, canvas.height/2, canvas.width);
break;
case "trees":
trees(canvas.width/2, canvas.height, 0, canvas.height/4, 10);
break;
default: console.warn(`Unexpected selection value: ${ x }.`);
}
}
```

Keep it up!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the repository for the missing README and Node.js start script, then locate the canvas selection onchange handler shown in the issue. Document how to run the project and decide whether the suggested branching cleanup belongs in scope; done means the instructions are usable and the requested code-review concerns are addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation, frontend
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.