function Gadget(name, color) {
  this.name = name;
  this.color = color;
  this.whatAreYou = function() {
    return 'Jestem ' + this.color + ' ' + this.name;
  }
}

---

Gadget.prototype.price = 100;
Gadget.prototype.rating = 3;
Gadget.prototype.getInfo = function() {
  return 'Ocena użytkownikow: ' + this.ratin + ', cena: ' + this.price;
};

---
var params = {
  productid: 666,
  section: 'products'
};

var url = 'http://example.org/page.php?',
    i,
    query = [];

for (i in params) {
    query.push(i + '=' + params[i]);
}

url += query.join('&');

---

function Gadget(name, color) {
  this.name = name;
  this.color = color;
  this.getName = function () {
    return this.name;
  };
}
Gadget.prototype.price = 100;
Gadget.prototype.rating = 3;

---

name = kamerka
color = czarna
getName = function () {
  return this.name;
}
price = 100
rating = 3

---

var monkey = {
  hair: true,
  feeds: 'banany',
  breathes: 'powietrze'
};

---

function Human(name) {
  this.name = name;
}
Human.prototype = monkey;

---

Array.prototype.inArray = function (needle) {
  for (var i = 0, len = this.length; i < len; i++) {
    if (this[i] === needle) {
      return true;
    }
  }
  return false;
};

---

if (typeof String.prototype.trim !== 'function') {
  String.prototype.trim = function () {
    return this.replace(/^\s+|\s+$/g,'');
  };
}
> " witaj ".trim();

---

