eslint: prefer-template template-curly-spacing When programmatically building up strings, use template strings instead of concatenation. When it comes to stylistic preference, I like to follow Airbnb Style guide. Which way is better all depends on the situation. I showed a few examples of using the different ways of concatenating strings. Const flag = '??' ` Use backtick \`\` to create a template string ` // RESULT // Use backtick `` to create a template stringīecause the other string creations are not using backtick, this scenario doesn't apply to them ? # Which way to use?
0 Comments
Leave a Reply. |