Array length in JavaScript

<script type="text/javascript">
    /* Code for Length of the array */
    document.writeln("Length of the array");

    coins = new Array("A","B","C","D");

    document.write(coins.length);
</script>