</ JS String Methods />
JavaScript
1 0 1 1 0 1 1 0 1 1 0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
</Basic String Methods
Javascript strings are primitive and immutable: All string
methods produce a new string without altering the original
string.
● String length ● String toUpperCase() ● String repeat()
● String charAt() ● String toLowerCase() ● String replace()
● String charCodeAt() ● String concat() ● String replaceAll()
● String at() ● String trim() ● String split()
● String [ ] ● String trimStart()
● String slice() ● String trimEnd()
● String substring() ● String padStart()
● String substr() ● String padEnd()
1 0 1 1 0 1 1 0 1 1 0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1
</String length </Output
● length: Returns the number of characters
in the string.
</String charAt() </Output
● charAt(): Returns the character at the
given index.
</String charCodeAt() </Output
● charCodeAt(): Returns the Unicode (ASCII)
value of the character at the given
index.
</String at() </Output
● at(): Similar to charAt(), but supports
negative indexing.
</String [ ] </Output
● str[]: Accesses a character like an array
but is read-only.
</String slice() </Output
● slice(): Extracts part of a string
(supports negative indexes).
</String substring() </Output
● substring(): Negative indexes are treated
as 0, and if start > end, they swap
automatically.
</String substr() </Output
● substr(): Extracts a portion of a string
based on starting position and length
(deprecated).
</String toUpperCase() </Output
● toUpperCase(): Converts all characters to
uppercase.
</String toLowerCase() </Output
● toLowerCase(): Converts all characters to
lowercase.
</String concat() </Output
● concat(): Joins two or more strings.
</String trim() </Output
● trim(): Removes spaces from both sides.
</String trimStart() </Output
● trimStart(): Removes spaces from the
beginning.
</String trimEnd() </Output
● trimEnd(): Removes spaces from the end.
</String padStart() </Output
● padStart(): Adds padding at the beginning
until it reaches the specified length.
</String padEnd() </Output
● padEnd(): Adds padding at the end.
</String repeat() </Output
● repeat(): Repeats the string.
</String replace() </Output
● replace(): Replaces only the first
occurrence.
</String replaceAll() </Output
● replaceAll(): Replaces all occurrences.
</String split() </Output
● split(): Splits the string into an array
based on the delimiter.
</ THANK YOU! />
JavaScript
1 0 1 1 0 1 1 0 1 1 0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1