blob: 3dd5816c2ed0939cd1c6ab84d2f4fcca6fd2a7cb [file] [log] [blame]
var MyApp = {};
function Address (town, state, number) {
var city;
var zip;
this.street = "Ulice";
city = town;
country = state;
zip = number;
MyApp.country = state;
this.print = function() {
if (zip == 16000) {
zip = 15000;
}
this.id = 123;
var result = city + " " + this.street + " " + zip + " " + country;
return result;
}
}
var address = new Address("Prague", "Czech Republic", 15000)
formatter.println(address.print());
telefon = "5648965";
formatter.println("Telefon: " + telefon);
formatter.println("Global Country: " + country);
formatter.println("MyApp.country: " + MyApp.country);
formatter.println("address id: " + address.id);