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

We spend hours scrolling social media and waste money on things we forget, but won’t spend 30 minutes a day earning certifications that can change our lives.
Master in DevOps, SRE, DevSecOps & MLOps by DevOps School!

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

JWT (JSON Web Token) vs OAuth 2.0

Both JWT and OAuth 2.0 are used for managing authentication and authorization, but they serve different purposes and work in distinct ways. 1. Purpose: 2. Role: 3….

Exploring and Creating a Proof of Concept (POC) to Upload APK Directly from GitHub Package

Automating the process of uploading an APK (or AAB) to the Google Play Store from GitHub can significantly speed up your CI/CD pipeline. By integrating Google Play’s…

A Detailed Guide to CI/CD with GitHub Actions

Continuous Integration (CI) and Continuous Deployment (CD) are modern software development practices that automate the process of integrating code changes, running tests, and deploying applications. With the…

Step-by-Step Guide for Setting Up Internal Testing in Google Play Console

1. Understanding the Types of Testing Before uploading your Android app for internal testing, it’s essential to know the differences between the testing options available in Google…

The Complete 2025 Guide to GitLab Training, Certification, and Expert Trainers

Level Up Your DevOps Career: The Complete 2025 Guide to GitLab Training, Certification, and Expert Trainers Introduction to GitLab: The Backbone of Modern DevOps As businesses accelerate…

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