how to predefine the length of array in javascript code example Example: javascript array predefined length new Array(4);