<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JavaScript array length</title>
</head>
<body>
<pre> <!-- Use pre element for work document.writeln() method -->
<script type="text/javascript">
var domain = new Array(10); // an empty array of length 10
document.writeln("length: " + domain.length);
</script>
</pre>
</body>
</html>