4 ms·
Thank you for posting -- I had never heard of tagged template literals! Reading the docs [1], it appears there is a `raw` property which might make this even s
by japanuspus 5y ago
Thank you for posting -- I had never heard of tagged template literals!
Reading the docs [1], it appears there is a `raw` property which might make this even simpler?
[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#raw_strings https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- maga 5y ago`raw` would allow us to pass the input as is without escaping it using JS rules, but otherwise the code would remain the same, we still have to "stitch" both arrays together with the loops.