How to get first element of array in Javascript?

By Hardik Savani | April 18, 2016 | | 3545 Viewer | Category : Javascript jQuery

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:


<script type="text/javascript">

var languages = ["PHP", ".Net", "Java", "Javascript"];

var first_element = languages[0];