How to get first element of array in Javascript?

By Hardik Savani September 6, 2020 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];



We are Recommending you