// hotel object (chain code, property id, name and image url) function Hotel(chainCode, propertyId, iCityCode, name, description, address, zip, rating, price, imgUrl, iataCode) { this.chainCode = chainCode; this.propertyId = propertyId; this.name = name; this.imgUrl = imgUrl; this.description = description; this.address = address; this.zip = zip; this.cityCode = iCityCode; if(rating) this.rating = parseFloat(rating).toFixed(1); else this.rating = -1.0; this.price = parseFloat(price).toFixed(0); this.iataCode = iataCode; }