for (name in flight)
{
if (typeof flight.name != 'function')
{
document.write(name + ':' + flight[name]);
}
// document.write(typeof name);
}
/*There is no guarantee on the order of the names,
If you want to assure that the properties appear
in a particular order,
*/
var properties = [
'airline',
'number'
];
for (i = 0 ; i < properties.length; i++)
{
document.writeln(properties[i] + ':' + flight[properties[i]]);
}