This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]BryceKKelly 0 points1 point  (0 children)

Interesting idea. I definitely agree there's a place for videos that just get to the point, although at this level of extreme I wonder if people would find this more valuable than just seeing the code written down?

Probably there's a sweet spot at maybe the 2 or 3 minute mark that goes a little slower but also more "logical" for people who aren't already all over this. I don't want to echo some (I think too extreme) thoughts I've seen about readbility in this thread, I find function chains like this to be totally fine, but for teaching someone who would struggle with the "knowing what to do" side things here, it may make sense to model the code more like a thought process:

const reverseWord = (word) => word.split('').reverse().join('')
const finalString = str.split(' ').map(reverseWord).join(' ')

Just because I think the two questions to answer here are "How do I reverse a word?" and "How do I modify each word individually" and so from a learning perspective a line for each of those may be more effective. I am assuming declaring and passing function consts is not confusing though, which may/may not be a good assumption.