Pattern: Missing separator in Array#join()
Issue: -
When using Array#join()
, explicitly specifying the separator makes the code's intent clearer rather than relying on the default comma separator. This improves code readability and maintainability.
Example of incorrect code:
foo.join();
Example of correct code:
foo.join(",");