0

I use the ` char for multi lines in JS (especially with document.write) which is very useful.

ex:

<script>
document.write(`hello 
    world
    line2
`);
</script>

However I don't really understand what it stands for (and worse) it does not work at all in IE9-IE10-IE11.

Is there a clean alternative to write document.write multi line ? (I loved that method to avoid using extra chars like \ or having to write document.write for each line until I realized it fails on Internet Explorer)

yarek
  • 11,278
  • 30
  • 120
  • 219
  • 1
    I think you might have to do it the old way in IE unfortunately. Check out this MDN article https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/template_strings – Jonah Nov 23 '15 at 10:12
  • It's called a backtick. Google "backtick Javascript". –  Nov 23 '15 at 13:44

0 Answers0