var str1 = "This is String One";
var str2 = 'Two';
var msg = "His name is 'John'";
var name = new String("Johnny");
String Properties : String object has following properties :
length : to return the length of the string.
prototype : this property used to add the new property and methods in string object.
String Methods : There are different methods which is supported by the all string objecs. Following are the list of the string methods :
charAt() : Return the string at particular index;
concat() : Join the strings and return new one.
indexOf() : Return the index of the particular character.
lastIndexOf() : Return the index of the particular character from it's last occurence.
match() : matches the string against given regular expression and return the array of that string.
replace() : It will first search the given string and then replace it's first occurence with other given string.
search() : Will search the given string and return the index of that string.
slice() : It is used to return the substring having start and end index.
split() : It breaks the string for a given expression and return the array of substring.
substr() : It is used to return the substring having start and end index.
substring() : It is used to return the substring having start and end index.
toString() : Convert and return the value into string object.
toLowerCase() : Convert and return the string in lowercase letter.
toUpperCase() : Convert and return the string in uppercase letter.
trim() : It removes the whitespace from start and end position.
charCodeAt() : Return the unicode value of specified index character.
FromCharCode() : Return the character for specified unicode value.