[JavaScript] C3 Logger format string

#1

When using a C3 Logger, prefer string interpolation using a format string instead of string concatenation:

// good
logger.info("Could not find {} with id '{}'", typeName, id);

// bad
logger.info("Could not find " + typeName + " with id '" + id + "'");

Reasoning: Less prone to bugs and typos (e.g., mismatched quotes)

2 Likes