Skip to content

Files

Latest commit

 

History

History
21 lines (15 loc) · 468 Bytes

no-console-spaces.md

File metadata and controls

21 lines (15 loc) · 468 Bytes

Pattern: Extra space in console method arguments

Issue: -

Description

Console methods automatically add spaces between arguments when joining them. Adding leading or trailing spaces in the arguments results in double spaces in the output.

Examples

Example of incorrect code:

console.log("abc ", "def");
console.log(" abc", "def");
console.log("abc", " def");

Example of correct code:

console.log("abc", "def");