• ValiantDust@feddit.de
    link
    fedilink
    arrow-up
    83
    arrow-down
    1
    ·
    8 months ago

    But are you gonna return something for this method??? You said you’d return an integer, yet there is no return statement!

    • sik0fewl@lemmy.ca
      link
      fedilink
      arrow-up
      17
      arrow-down
      1
      ·
      8 months ago

      This is why I always write my methods from bottom to top. This way I’ve always got a return statement and I use my variables before they are even declared.