Bachelor's and Master's in CS from MIT. Previously, worked @ Microsoft & Zynga. Currently Co-Founder of Moesif (moesif.com), the most advanced API analytics platform.
if you are covering arrays and "each" method, it might be worth a while to point out the "map" method. Since they are similiar and yet have very important differences:
Array#each executes the given block for each element of the array.
Array#map also executes the given block for each element of the array, but returns a new array whose values are the return values of each iteration of the block.
Use them effectively is very important. :)
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.
Great article:
if you are covering arrays and "each" method, it might be worth a while to point out the "map" method. Since they are similiar and yet have very important differences:
Array#each executes the given block for each element of the array.
Array#map also executes the given block for each element of the array, but returns a new array whose values are the return values of each iteration of the block.
Use them effectively is very important. :)