Those two functions do exactly the same, the return type annotation in the second case is redundant since the type is inferred by the compiler, but might make it more clear for those who are going to read the code (however, unlikely 😉). I would say the type annotation is unnecessary.
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.
Thank you for your feedback!
Those two functions do exactly the same, the return type annotation in the second case is redundant since the type is inferred by the compiler, but might make it more clear for those who are going to read the code (however, unlikely 😉). I would say the type annotation is unnecessary.