10

Time Wasted: 30 Minutes

Problem: Put the .add(myObject) statement OUTSIDE the for loop.

Solution: Today.Quit() || Coffee.Make();

Comments
  • 0
    If you put the .add outside the loop, then you put the declaration also outside the loop, so beware of reference objects at the moment to add new objects. I don't know what language you are using but sometimes you end up with a list referencing the same object
  • 0
    @garciabm Thanks for the pointer! I'm currently working in PowerShell for some DevOps work.
Add Comment