Javascript Methods short discussion
Array Methods
- concat()
concat() is an array javascript method using for adding two or more arrays. It returns a new array for adding two or more arrays. You use concat method parameter in the second array name or using direct value. It is added the old/first array and returns a new array.
example:
2. find()
find() is the javascript array method. it is using to search an array element in the array. The find method parameter you can provide a callback function then set your condition in the callback function. After the condition is true return this element otherwise return undefined.
example:
3. findIndex()
findIndex method using for find array element index, you can provide a callback function in findIndex parameter then set the condition in callback function after matching the condition then return 1 otherwise return -1
example:
4. filter()
filter method using for filter arrays. filter parameter must provide a callback function then set your condition in a callback function. Check the condition of all array elements. Then With those element conditions that have been true then return a new array for this element.
example:
5. pop()
pop method using for the array the last element removed. If you use the pop method then remove the last element in your array and return this element.
example:
6. shift()
shift method using for the array first element removed. If you use the shift method then remove the first element in your array and return this element.
example:
7. push()
push method using to add a new element in the array and a new element is added to the last element in the array and return this array length.
example:
8. unshift()
Get Md Rasel’s stories in your inbox
Join Medium for free to get updates from this writer.
unshift method using to add a new element in the array and a new element is add the first element in the array and return this array length.
example:
9. reverse()
reverse method is using for reverse array elements. If you use this method reverse all elements in your array and return this array.
example:
10. join()
join method is using for converted all array elements to string. you use this method then return a string for all elements. You do not use any parameter in the join method parameter then add a comma by default in the middle for all elements and return this string, or you use an empty string then return only all elements.
example:
String Methods
- charAt()
charAt method is using for a letter in the string. You provide a parameter then return this index letter or by default return, the first index letter but your provided parameter is bigger than the array length then return an empty string.
example:
2. concat()
concat() method used for adding two or more strings. It returns a new string for adding two or more strings. You use concat method parameter in the second variable name or using direct value. It is added the old/first string and returns a new string.
example:
Math Methods
- abs()
abs method is using for a negative number converted to a positive number and it is returning this converted number.
example:
2. max()
The max method is using for two number difference and it is returning the maximum number.
example:
3. min()
The min method is using for two number difference and it is returning the minimum number.
example:





