Exports can be confusing for beginner-level exercises
See original GitHub issueFrom a comment on this two-fer
solution:
I had to add export to my code in order to get it to work. I understand how modules and webpack work, but doesn’t it seem weird to include advanced knowledge like this in beginner exercises?
We changed all exercises from default to named exports, but in either case it can be confusing for beginners who are not aware of how modules & exports work.
One solution I see is adding stub files for all core exercises. Thoughts?
Edit: Another instance today:
Mentee had not exported the function and just had:
let twoFer = () ...
My comment on two-fer
exercise:
You will have to export your function so that tests can use it.
Reply from mentee:
Hi, thanks for the review. What do you mean by exporting my function?
This was my bad in assuming (s)he would be aware of exports
but is still relevant to this issue.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
Yes. This is the solution and I don’t think we should do anything else. Other tracks have gone the same route.
Closing in favor of #679