标签:ast log data es6 字符 console map span add
const tmpl = addrs => ` <table> ${addrs.map(addr => ` <tr><td>${addr.first}</td></tr> <tr><td>${addr.last}</td></tr> `).join("")} </table> `; const data = [ { first: "<Jane>", last: "Bond" }, { first: "Lars", last: "<Croft>" }, ]; console.log(tmpl(data));
标签:ast log data es6 字符 console map span add
原文地址:http://www.cnblogs.com/beesky520/p/6747137.html