Object - inny sposób

function samochod(nazwa, moc){
  this.nazwa = nazwa;
  this.moc = moc;
  this.pokaz = function(x){
   alert(this.nazwa + ": "+ x+ " PLN");
    }
}

var s = new samochod("fiat", 100);
s.pokaz(500);