Ad
  • Custom User Avatar

    It could be applied with either functions, but arrow functions always lead to cleaner code. In this solution, the num parameter was changed to length so he can just include the parameter as the length of the array instead of doing this {length: num}. Leads to cleaner code. the underscore at (_, i) basically a placeholder for the value since we don't really need a specific value from an array here.

  • Custom User Avatar

    Didn't expect to see something like this, love it!