Though I'm getting the impression that we might have different conceptions of the word "practical". From my perspective, a for loop is one of the most basic javascript keywords. Used in pretty much every app ever. The practicality of being able to hook into that keyword (and related keywords continue and break) with a custom object seems self evident? Or are you more simply wondering why someone wouldn't just extend Array (or expose the data as an array via a property)?
I believe I might need to extend my definition of practical. I was looking for real-world use-cases since some of the examples seem challenging to see applied in production code. I’m trying to showcase code that is more than just an example.
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.
I'll let rSchedule be my practical example.
Though I'm getting the impression that we might have different conceptions of the word "practical". From my perspective, a
for
loop is one of the most basic javascript keywords. Used in pretty much every app ever. The practicality of being able to hook into that keyword (and related keywordscontinue
andbreak
) with a custom object seems self evident? Or are you more simply wondering why someone wouldn't just extendArray
(or expose the data as an array via a property)?I believe I might need to extend my definition of practical. I was looking for real-world use-cases since some of the examples seem challenging to see applied in production code. I’m trying to showcase code that is more than just an example.