Do you think the concept "having the end mind" is applicable here?
and
So, basically you first show this at the start of the article (introduce the end goal):
indexById(null) //=> {} indexById([]) //=> {} indexById([ 1, 2, 3 ]) //=> {} indexById(data) //=> { // 9CYolEKK: { id: '9CYolEKK', learner: 'Molly' }, // gbdCC8Ui: { id: 'gbdCC8Ui', learner: 'Thomas' }, // 1AceDkK_: { id: '1AceDkK_', learner: 'Lisa' } // }
And then you just show the imperative approach and then show how to refactor that approach into the functional one and what are the benefits.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Do you think the concept "having the end mind" is applicable here?
and
So, basically you first show this at the start of the article (introduce the end goal):
And then you just show the imperative approach and then show how to refactor that approach into the functional one and what are the benefits.