26

I spent more than an hour trying trying to debug why two functions were always returning undefined. I even put in conditional breakpoints and executed the statements to confirm the logic was correct.

I forgot return.

Comments
  • 1
    💔 omg. So much heartbreak for you. It happens to everyone (some silly mistake), but it still sucks every time
  • 1
    I know your struggle. I sometimes forget to assign the result of a method/function to a variable and wonder why it didn't work
  • 0
    @CorruptComputer I was actually using typescript, but I didn't annotate the function. Otherwise it would have been a compiler error. Double face palm.
  • 2
    It's always "funny" to spend an hour or so writing some wonderful code and fire up the browser and and sit and wonder why the magic isn't happening.

    Then...oh yeah- I need to actually call that method.

    Goddammit.
Add Comment