InterviewSolution
| 1. |
What Is Javascript Strings Object? |
|
Answer» The String object LETS you work with a series of CHARACTERS; it wraps JAVASCRIPT's string primitive data type with a number of helper methods. As JavaScript automatically converts between string primitives and String objects, you can call any of the helper methods of the String object on a string primitive. Syntax: Use the following syntax to CREATE a String object − var val = new String(string); The String parameter is a series of characters that has been properly encoded. The String object lets you work with a series of characters; it wraps Javascript's string primitive data type with a number of helper methods. As JavaScript automatically converts between string primitives and String objects, you can call any of the helper methods of the String object on a string primitive. Syntax: Use the following syntax to create a String object − var val = new String(string); The String parameter is a series of characters that has been properly encoded. |
|