Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.



Get Started Now!

JAVASCRIPT METHODS

  1. length // it is a property
  2. toLowerCase()
  3. toUpperCase()
  4. Includes()
  5. startsWith()
  6. endsWith()
  7. search()
  8. match()
  9. indexOf()
  10. lastIndexOf()
  11. replace()
  12. trim()
  13. charAt()
  14. charCodeAt()
  15. fromCharCode()
  16. concat()
  17. Split()
  18. repeat()
  19. slice()
  20. substr()
  21. substring()
  22. toString()
  23. valueOf()
  1. length() //It is a property

Example:-

Output: 30

2. toLowerCase() //Methods are having round brackets

Example:-

Output: javascript is a great language

3. toUpperCase()

Example:

Output: JAVASCRIPT IS A GREAT LANGUAGE

4. includes()

Includes use to find text or word form content . It shows result in true or false.

It is case sensitive method.

Example:

Output: true

5. startsWith()

It returns the first word or character of the sentence

It is a case sensitive method

Example:

Output: true

6. endsWith()

It returns the last word or character of the sentence

It is a case sensitive method

Example:

Output: true

 7.   Search()

It search word and show the index value.

If this method didn’t find anything then it returns -1

Example:

Output: 11

8. match()

It match the word and make it array

Example:

Output: is,is

9. indexOf()

It search position from start and returns index value

Example:

Output: 11

10. lastIndexOf()

It search position of last and returns index value

Example:

Output: 22

11. replace()

It replace the words

Example:

Output: python is a GREAT Language

12. trim()

Example:

Output: JavaScript is a GREAT Language

13. charAt()

It returns the position index value.

Example:

Output: a

14. charCodeAt()

It returns ascii code of given value.

Example:

Output: 97

15. formCharCode()

It shows the ASCII value of given value.

It doesn’t need any string it has inbuilt object

Example:

Output: A

ASCII code table

16. concat()

This function concat or add 2 or more strings.

Example:

Output:

JavaScript is a GREAT Language also python is great language

17. split()

It method use to make  array of string where we put split function

Example:

Output: JavaScript,is,a,GREAT,Language

18. repeat()

It repeat the string as our preference.

Example:

Output: JavaScript is a GREAT LanguageJavaScript is a GREAT Languageuage

19. slice()

It basic use two parameters first character shows for where starts(parameter1) the string with and second parameters shows to the end.

Example:

Output: vaScript is a

20. substr()

It is work similarly as slice but it count value where first parameter is starts.

Example:

Output: vaSc

21. substring()

It is work similarly as substr but it when show parameter2 then it shows less 1 charecter(if we write 5th place it retuns 4th place value)

Example:

Output: vaS

22. toString()

It converts datatype to the string.

Output: 55 (as a string)

23. valueOf()

This function is default, It show string as it is.

Output: JavaScript is a GREAT Language

Related Posts

Error in Laravel:”Invalid Key Supplied”

while trying to log in to your Laravel application, don’t worry. This issue is commonly related to misconfigured or missing keys for Laravel Passport’s OAuth2 authentication system….

Error in Laravel “Davmixcool\MetaManager\MetaServiceProvider Not Found”

When working on Laravel projects, developers often encounter errors during the setup or runtime process. One such error is the “Class ‘Davmixcool\MetaManager\MetaServiceProvider’ not found”, which can occur…

Discover Rewa Effortlessly with Motoshare’s Convenient Bike and Car Rentals

Rewa, the “Land of White Tigers,” offers a unique blend of historical, cultural, and natural attractions that captivate every traveler. To make exploring this charming city more…

Discover Shimoga (Shivamogga) Effortlessly with Motoshare’s Bike and Car Rentals

Nestled in the lush greenery of Karnataka, Shimoga (Shivamogga) is a haven for nature lovers and history enthusiasts. From the roaring Jog Falls to the tranquil forests…

Explore the Spiritual Charm of Mathura with Motoshare’s New Bike and Car Rental Services

Mathura, the birthplace of Lord Krishna, is a city brimming with spirituality, vibrant culture, and historical significance. To make your journey through this sacred city seamless, Motoshare…

Explore Nizamabad Effortlessly with Motoshare’s New Bike and Car Rental Services

Nizamabad, known for its historical monuments, serene landscapes, and rich cultural heritage, is now easier to explore with Motoshare’s newly launched bike and car rental services. Whether…

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x