How to Use Text Processing with Strings

A String is simply a sequence of characters. There are different ways to create Strings – either as a string literal or as a String object using the String() constructor. Strings can be compared to an array of characters and are often accessed similarly. Understanding them is crucial as they play a significant role in input and manipulation within coding.

Constructor

String()

Creates a new String object. It performs type conversion when called as a function, rather than as a constructor, which is usually more useful.