10 important methods of JavaScript you need to know.

Gazi Robiul
3 min readMay 5, 2021
  1. concat()

This method used for concatenates a string with another string and return a new string.

2. indexOf()

This method returns the position of the specified value of a string.

Note: The index of the first character is 0.

3. slice()

This method uses to copy a section of string and return a new string. Without changing the original string.

4. toUppercase()

In this method, you can convert a string value into an uppercase.

5. toLowerCase()

This method is the opposite method of toUppercase(). By this method, you can convert a string value into a lowercase.

6. parseFloat()

This method used to convert a string into a number and return a floating-point number.

Note: only the first number of a string is returned. And If the first character is filed to covert a number then it returns NaN.

7. Math.max()

This method returns a number with largest value.

8. Math.min()

This method is the opposite method of Math.max(). This method returns a number with lowest value.

9. pop()

You can use this method to remove the last element from an array.

10. shift()

Like the pop() method this method also use to remove the first element of an array.

You can try all of these methods.

“ Happy Coding :) ”

--

--