Saved X
Google login
SignUp with Email
X

Javascript get array size

theindreshverma ( Edited  Sep 29, 06:42 pm )
Login

Javascript length method

<button onclick="getSize()">Get array size</button>
<script>
function getSize() {
    var arr = ["Apple", "Banana", "Mango", "Orange", "Papaya"];
    
    alert(arr.length);
}
</script>

Sourcecode Tags

More Sourcecodes

More Sourcecodes