You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The factory function lesson is a great lesson but understandably tricky given the wealth of info to be taught.
Recently I've noticed a few questions where confusion stems from not quite following or even missing some comments, or otherwise questions about why the lesson's code style differs from other lessons (in case that is a signficant factor).
I think the following tweaks can help streamline the lesson a little:
Reposition some comments to be above the code they directly refer to rather than below
Split some code blocks so that some "bare" comments become normal lesson text, aiding in visibility and separating examples addressing separate concepts/steps.
Adjust code style to be a little more consistent with previous lessons (e.g. using a function declaration for constructor rather than traditional func exp assigned to variable).
Expand very slightly on opening paragraph for the section on IIFEs to help answer the question "well why can't we just write a normal factory function then call it once instead of wrapping it in an IIFE?"
I'm not on the team anymore :P And since it's a slightly bigger edit to lesson content, I'd rather propose the issue nad changes and await discussion/assignment before PRing.
Checks
Describe your suggestion
The factory function lesson is a great lesson but understandably tricky given the wealth of info to be taught.
Recently I've noticed a few questions where confusion stems from not quite following or even missing some comments, or otherwise questions about why the lesson's code style differs from other lessons (in case that is a signficant factor).
I think the following tweaks can help streamline the lesson a little:
Path
Ruby / Rails, Node / JS
Lesson Url
https://www.theodinproject.com/lessons/node-path-javascript-factory-functions-and-the-module-pattern
(Optional) Discord Name
No response
(Optional) Additional Comments
No response
The text was updated successfully, but these errors were encountered: