Functions that are properties of a particular entity are known as methods. These methods can be accessed using the . operator. The string data type has several methods associated with it. Let’s look at some of them.
The next basic data type is the string. Strings are used to represent text. They are written by enclosing their content in quotes.
You can use single quotes, double quotes, or backticks to mark strings, as long as the quotes at the start and the end of the string match.
A group of characters such as this is an example of the string data type.
A string is a collection of characters closed within single, double or triple quotation marks.
A string can also contain a single character or be entirely empty.