Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How to returns the length of an array (the number of array elements) ?

user-image
Question added by mohamed ahmed mahmoud , مصمم مواقع انترنت web designer , conect
Date Posted: 2017/03/18
medhatmahmoud mahmoud
by medhatmahmoud mahmoud , Web Designer , Connect Computer Service Co

<p id="result"></p>

 

<script>

var names = ["mohamed", "ahmed", "mahmoud", "karem"];

document.getElementById("result").innerHTML = names.length;

</script>

 

 

this will retrun 4 

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.