Google News
logo
CoffeeScript - Interview Questions
What are the Block strings in CoffeeScript?
Block strings, delimited by """ or ''', can be used to hold formatted or indentation-sensitive text (or, if you just don’t feel like escaping quotes and apostrophes). The indentation level that begins the block is maintained throughout, so you can keep it all aligned with the body of your code.
html = """
       <strong>
         cup of coffeescript
       </strong>
       """​
var html;
​
html = `<strong>
  cup of coffeescript
</strong>`;

​Double-quoted block strings, like other double-quoted strings, allow interpolation.

 

​
Advertisement