Tag : Index


How to get first element of array in Javascript?

Whenever you require to get first element value then you can use bellow example. I give you the way to get first element value in jquery. So let's see following example: <strong>Example</strong> <pre class="prettyprint lang-js"> <script type="text/javascript"> <br/> var languages = ["PHP", ".Net", "Java", "Javascript"]; <br/> var first_element = languages[0]; console.log(first_element); <br/> </script> </pre>

By Hardik Savani | April 18, 2016 | | 1503 Viewer | Category : Javascript jQuery
READ MORE

How to get last element of array in Javascript?

Whenever you require to get last element value then you can use bellow example. I give you three way to get last element value in jquery. So let's see following example: <strong>Example</strong> <pre class="prettyprint lang-js"> <script type="text/javascript"> <br/> var languages = ["PHP", ".Net", "Java", "Javascript"]; <br/> var last_element = languages[languages.length-1]; console.log(last_element); <br/> var last_element2 = languages.pop(); console.log(last_element2); <br/> var last_element3 = languages.slice(-1)[0]; console.log(last_element3);.....

By Hardik Savani | April 16, 2016 | | 1891 Viewer | Category : Javascript jQuery
READ MORE

    Paypal payment gateway integration in php source code example

    Paypal payment gateway integration in php source code example

    Open Post

    PHP Image upload without refreshing page using jquery example

    PHP Image upload without refreshing page using jquery example

    Open Post

    How to create custom scrollbar using jquery mcustomscrollbar plugin ?

    How to create custom scrollbar using jquery mcustomscrollbar plugin ?

    Open Post

    Bootstrap progress bar animate example using bootstrap-progressbar.js

    Bootstrap progress bar animate example using bootstrap-progressbar.js

    Open Post

    Laravel 5 - Twitter API using thujohn/twitter composer package tutorial

    Laravel 5 - Twitter API using thujohn/twitter composer package tutorial

    Open Post

    PHP - How to implement Google new reCAPTCHA Code Example with Demo?

    PHP - How to implement Google new reCAPTCHA Code Example with Demo?

    Open Post