Skip to content

Files

Latest commit

 

History

History
19 lines (13 loc) · 408 Bytes

require-array-join-separator.md

File metadata and controls

19 lines (13 loc) · 408 Bytes

Pattern: Missing separator in Array#join()

Issue: -

Description

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.

Examples

Example of incorrect code:

foo.join();

Example of correct code:

foo.join(",");