Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 732 Bytes

language_explicit_string_interpolation.mdx

File metadata and controls

34 lines (24 loc) · 732 Bytes
id keywords name summary category
explicit-string-interpolation
string
interpolation
``
This is the explicit `string` interpolation syntax.
languageconstructs

An explicit string interpolation is composed of two backticks. It works like JavaScript's backtick string interpolation without the need to escape special characters.

Example

<CodeTab labels={["ReScript", "JS Output"]}>

let language = "ReScript"

let exclamation = `${language} is pretty cool.
Right?
🎉
`
var language = "ReScript";

var exclamation = language + " is pretty cool.\nRight?\n🎉\n";

References