Cofounded Host Collective (DiscountASP.net). Cofounded Player Axis (Social Gaming). Computer Scientist and Technology Evangelist with 20+ years of experience with JavaScript!
I have fallen in love with this syntax over a for loop:
constisOlderThan18=(age)=>age>18;
The reason being, with a for loop, the focus is on operating on the collection as a whole.
By making this minor change, we have simplified our work to just operating on a single item and not a whole collection of items, which is more complex.
Once we have solved how to handle the single item, it becomes easy to then apply that solution also to the collection.
I have fallen in love with this syntax over a for loop:
The reason being, with a for loop, the focus is on operating on the collection as a whole.
By making this minor change, we have simplified our work to just operating on a single item and not a whole collection of items, which is more complex.
Once we have solved how to handle the single item, it becomes easy to then apply that solution also to the collection.
Cheers!