- constructor:此陣列的製造器。
- index:用在文法規則計算式(Regular Expression)的符合計算(match)。存有第一個符合的字串其指標。此為唯讀變數。
- input:用在文法規則計算式的符合計算。存有用於計算的源字串。此為唯讀變數。
- length:陣列的長度。
- 程式用法:
<script type='text/javascript'>
var ar=new Array('吳宗憲', 55, '大頭');
document.write( ar.constructor +'<br />' +
ar.index +'<br />' +
ar.input +'<br />' +
ar.length );
</script> - 執行結果:
function Array() { [native code] }
undefined
undefined
3
- index, input 只有使用文法規則計算式的符合計算時才會產生。