Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 387 Bytes

no-unnecessary-local-variable.md

File metadata and controls

13 lines (8 loc) · 387 Bytes

Pattern: Unnecessary local variable

Issue: -

Description

Do not declare a variable only to return it from the function on the next line. It is always less code to simply return the expression that initializes the variable.

Further Reading