September 6, 2020
Category : Javascript
jQuery
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:
Example
<script type="text/javascript">
var languages = ["PHP", ".Net", "Java", "Javascript"];
var first_element = languages[0];
console.log(first_element);
</script>

Hardik Savani
I'm a full-stack developer, entrepreneur and owner of Aatman Infotech. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Laravel, Angular, Vue, Node, Javascript, JQuery, Codeigniter and Bootstrap from the early stage. I believe in Hardworking and Consistency.