Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

JS - combine string and variable with backtick

0 votes
168 views
added Aug 2, 2019 in Javascript by LC Marshal Captain (26,090 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 by lcjr First Warrant Officer (8,030 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.
...