var str1 = 'world';
var test=`/hello/${str1}/`;
console.log(test);
///hello/replace/
...全文
1855打赏收藏
请教javascript基础,看不懂这种写法
大家好,最近初学javascript,在一个项目中看到下面的这个写法,上网查了很久很久都没有明白这是什么东西,有点像正则表达式但又不像,弄不懂,求指教!! var str1 = 'world'; var test=`/hello/${str1}/`; console.log(test); ///hello/replace/