Javascript examples for Array:length Property
Access element name with no value from array
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=( function() {/*w ww. ja va2s . c o m*/ var arr = []; var person={fname:"John",lname:"Doe",age:25}; arr.push(person); for (var i=0; i < arr.length; i++) { document.write(arr[i].lname+ " "); } }); </script> </head> <body> </body> </html>