I call this one : "I have no time to find a better solution"

  • 12
    i guess you can say his code is in dis-array
  • 2
    Wow, I just felt the same kind of disappointment when I saw this as when a girl you like rejects you. 😟
  • 1
    What about

    for (var i = 1; i <= 100; i++)
    req.body["a" + i]

    And then add those to an array or something?
  • 1
    You should've called it "No one will ever like you again and you'll die alone"
  • 3
    Man, every once in a while I stumbled upon Shit like this.
    I don't get it, one of the first things you learn in every programmer book or course is how to use loops.

    Ah no, fuck it.
  • 2
    Do you really need to iterate it?
    var newValue = Object.assign({}, req.body);
  • 0
    @oroys a collection would work as well.
  • 1
    Yeah, an array would be a beauty right about now. Unless there's a solid reason why an array won't really work.
Add Comment