:::: MENU ::::

How to use javascript functions

Javascript have very important role on modern web and mobile technologies. In this tutorial i want to show some javascript functions with samples.

Concat 

Concat function helps us to add array to another array.

Sample Use:


Every

Expecting true answer from user defined function for every member of array.

Sample Use:

Filter

We can use filter function to filter array with our conditions.

Sample Use:

Foreach

It runs a function for every element in array

IndexOf

Return given element index number in array.

Join

Join all elements of array with seperator and return as a string,

LastIndexOf

Returns last index number of given element of an array

Map

Apply function to all array elements

Pop

Remove last member from array and return removed element

Push

Adds a element to array

Reverse 

Reverse array elements

Shift

Remove first element from array and return removed element

Slice

Return a part of array

Some

Check all elements of array and expect at least value return to true

 

 


So, what do you think ?