- Expert Angular
- Mathieu Nayrolles Rajesh Gunasundaram Sridhar Rao
- 62字
- 2021-07-15 17:05:30
String
The string data type can hold a sequence of characters. Declaring and initializing the string variable is very simple, as follows:
var authorName: string = "Rajesh Gunasundaram";
Here, we declared a variable named authorName as a string, and it is assigned the value Rajesh Gunasundaram. TypeScript supports surrounding the string value with either a double quotes (") or single quotes (').