I find it more confusing to return a variable in a return unless it is really basic (like changing the message of a JSON response depending the data given).
Early returns make it sure you don't even up with mutating the response somewhere later in the code. It also make more readable (imo) because not everything is nested.
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.
I find it more confusing to return a variable in a return unless it is really basic (like changing the message of a JSON response depending the data given).
Early returns make it sure you don't even up with mutating the response somewhere later in the code. It also make more readable (imo) because not everything is nested.