We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5abf344 commit ea64746Copy full SHA for ea64746
lib/exercises/tagged_template_strings/solution/solution.js
@@ -1,11 +1,9 @@
1
console.log(html`<b>${process.argv[2]} says</b>: "${process.argv[3]}"`);
2
3
function html(pieces, ...substitutions) {
4
- substitutions = substitutions.map(escape);
5
-
6
var result = pieces[0];
7
for (var i = 0; i < substitutions.length; ++i) {
8
- result += substitutions[i] + pieces[i + 1];
+ result += escape(substitutions[i]) + pieces[i + 1];
9
}
10
11
return result;
0 commit comments