About 71,200 results
Open links in new tab
  1. How can I build/concatenate strings in JavaScript?

    I'm working on a JavaScript project, and as it's getting bigger, keeping strings in good shape is getting a lot harder. I'm wondering what's the easiest and most conventional way to construct …

  2. javascript - JS strings "+" vs concat method - Stack Overflow

    I have some experience with Java and I know that strings concatenation with "+" operator produces new object. I'd like to know how to do it in JS in the best way, what is the best …

  3. Most efficient way to concatenate strings in JavaScript?

    May 22, 2013 · 214 In JavaScript, I have a loop that has many iterations, and in each iteration, I am creating a huge string with many += operators. Is there a more efficient way to create a …

  4. What does ${} (dollar sign and curly braces) mean in a string in ...

    Mar 7, 2016 · What does $ {} (dollar sign and curly braces) mean in a string in JavaScript? Asked 9 years, 7 months ago Modified 1 year, 10 months ago Viewed 423k times

  5. javascript - How do I concatenate a string with a variable? - Stack ...

    In javascript the "+" operator is used to add numbers or to concatenate strings. if one of the operands is a string "+" concatenates, and if it is only numbers it adds them.

  6. Are ES6 template literals faster than string concatenation?

    String concatenation of course is faster. There is no parsing going on. It is just adding to the length of the string. Still I would use template literals.

  7. javascript - Why is string concatenation faster than array join ...

    Firefox was the first browser to optimize string concatenation. Beginning with version 1.0, the array technique is actually slower than using the plus operator in all cases. Other browsers …

  8. javascript - Using the ternary operator with string concatenation ...

    The + operator causes concatenation with strings and forces all primitive variables to attempt to represent themselves as strings as well. false evaluates as the string "false" creating the …

  9. javascript - ES6 template literals vs. concatenated strings - Stack ...

    Dec 19, 2014 · You basically asking what is the difference between string interpolation vs string concatenation.

  10. javascript - How can I assign a multiline string literal to a variable ...

    Apr 30, 2009 · The correct way to cause a line terminator character to be part of the String value of a string literal is to use an escape sequence such as \n or \u000A."