Does CoffeeScript support interpolation in single quotation string? Does CoffeeScript support interpolation in single quotation string? ruby ruby

Does CoffeeScript support interpolation in single quotation string?


From the CoffeeScript documentation:

Ruby-style string interpolation is included in CoffeeScript. Double-quoted strings allow for interpolated values, using #{ ... }, and single-quoted strings are literal.


"It's just javascript" means it fundamentally compiles to ordinary JavaScript and doesn't attempt to take a radically different programming paradigm and compile it to JavaScript. CoffeeScript is primarily concerned with avoiding "the bad parts", boilerplate, and unnecessary syntax as opposed to introducing radically different basic constructs such as data types, etc.

JavaScript has no string interpolation. CoffeeScript brings this over from Ruby as a convenience. Disabling it for single quotes just gives you a clean way to get a string without the interpolation interpreted.

Don't take It's just JavaScript to mean It IS JavaScript. It's a flavor/variant/sibling.