Skip to content

Files

Latest commit

 

History

History
25 lines (18 loc) · 643 Bytes

prefer_adjacent_string_concatenation.md

File metadata and controls

25 lines (18 loc) · 643 Bytes

Pattern: Missing use of adjacent strings for concatenation

Issue: -

Description

DO use adjacent strings to concatenate string literals.

Example of incorrect code:

raiseAlarm(
  'ERROR: Parts of the spaceship are on fire. Other ' +
  'parts are overrun by martians. Unclear which are which.');

Example of correct code:

raiseAlarm(
  'ERROR: Parts of the spaceship are on fire. Other '
  'parts are overrun by martians. Unclear which are which.');

Further Reading