I also use finally to toggle loading indicators to keep things DRY in my then/catches. If I'm doing the same line of code in both, I move it to the finally block.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great write-up! I've only ever found a single good use for
finally
. You could do performance checks usingconsole.time
.Nice tip!
I also use
finally
to toggle loading indicators to keep things DRY in my then/catches. If I'm doing the same line of code in both, I move it to the finally block.