join vs template

Edit on GitHub

comparing string concatonation

Setup

let str1 = "string 1",
str2 = "string 2",
str3 = "string 3";

Tests

  • join

    [ "/", str1, str2, str3 ].join("")
  • template

    `/${str1 + str2 + str3}`