Site Owners Forums - Webmaster Forums

Site Owners Forums - Webmaster Forums (http://siteownersforums.com/index.php)
-   Programming General (http://siteownersforums.com/forumdisplay.php?f=44)
-   -   Javascript String methods (http://siteownersforums.com/showthread.php?t=983005)

sahithya 12-27-2022 09:20 PM

Javascript String methods
 
Slice
Slice extracts a part of a string and returns the extracted part in a new string.
The method takes 2 parameters: start position, and end position.

Length
Returns the length of a string.

Replace
Replace method replaces a specified value with another value in a string.

ToLowerCase & ToUpperCase
A string is converted to upper case with toUpperCase.
A string is converted to lower case with toLowerCase.

Concat
Concat joins two or more strings.

Trim
The trim method removes whitespace from both sides of a string.

CharAt
The CharAt method returns the character at a specified index (position) in a string.


All times are GMT -7. The time now is 08:35 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.