Member-only story
Strings in JavaScript
[12] JavaScript Basics to Advanced Series: In this article we will learn about Functions in JavaScript.
My articles are open for everyone; non-member readers can read the article by clicking this link.
Strings
We have two kinds of Strings in JavaScript:
- String primitive
- String object
Example:
Split Method: Split a given string based on a given character, in this example we pass ‘ ‘ empty space to split a string.
We get array of 4 items and each item is a word.
But, internally this message
string is also an object.
Properties and methods of string object:
Other Properties and methods of string object: