JS - combine string and variable with backtick

0 votes
506 views
added Aug 2, 2019 in Javascript by LC Marshal Captain (25,790 points)
var post = '<div id="nexpost" class="news-article news-details">';
post += `<h2 class="entry-title">${j0.title}</h2></div>`;

 

1 Response

0 votes
responded Mar 11, 2022 by lcjr First Warrant Officer (11,530 points)
<a
  href={`/new-launches/${feature.url_s}`}
  className="button"
>
  Learn More
</a>

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...