Try adding the calculation/action in the return of the function.

·

1 min read

You will be able to reduce the number of lines used