CodingTrain / CodingTrain/Suggestion-Box
tutorial on passing parameter in callback
Open
Tutorial
- Dominant language
- No language data
- Stars
- 570
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
Another tutorial I think students will greatly benefit from is being able to pass a parameter in a callback. I am able to teach this in the classroom but it becomes a tad difficult to explain this via slack at midnight to a student.
```
btn_roomGenerator.mousePressed(_ => {
generateRoom.call(this, randRoom);
console.log('generated room');
});
```
maybe this could be a tut on call(), apply(), and bind() ... ?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.