mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
[typescript/en] Multiline Strings
Multiline Strings via Template Strings
This commit is contained in:
parent
c3387b8a61
commit
525b6106a5
@ -159,9 +159,13 @@ var tuple = pairToTuple({ item1:"hello", item2:"world"});
|
|||||||
// Including references to a definition file:
|
// Including references to a definition file:
|
||||||
/// <reference path="jquery.d.ts" />
|
/// <reference path="jquery.d.ts" />
|
||||||
|
|
||||||
// Template Strings
|
// Template Strings (strings that use backtics)
|
||||||
|
// String Intepolation with Template Strings
|
||||||
var name = 'Tyrone';
|
var name = 'Tyrone';
|
||||||
var greeting = `Hi ${name}, how are you?`
|
var greeting = `Hi ${name}, how are you?`
|
||||||
|
// Multiline Strings with Template Strings
|
||||||
|
var multiline = `This is an example
|
||||||
|
of a multiline string`;
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user