ES6 template literals inside jQuery $.each method

Viewed 11302

Is it possible to use ES6 template literals inside jQuery's $.each method?

Tried to do like this, without success:

let arr = this.arr;

  $.each($("g#texts").children(), function (i, contents) {
    $("#`${contents.id}` tspan")
        .text(arr.find(a => a.name == "`${contents.id}`")
        .displayedName);
  })

What should be corrected here?

1 Answers
Related