Great post!! For my 10 line function approach #2 suffices, but the final solution will sure come in handy some day!
By the way: in my case the barrier check is in a deeper nested function. I throw an error instead of a simple return. That way I can suffice with only a single barrier check instead of 5.
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 post!! For my 10 line function approach #2 suffices, but the final solution will sure come in handy some day!
By the way: in my case the barrier check is in a deeper nested function. I throw an error instead of a simple return. That way I can suffice with only a single barrier check instead of 5.