1. // foo is a cool function
  2. function foo() {}
  3. /* bar is a cool var */
  4. var bar = 3;
  5. A.prototype.foo = function() {
  6. this.noise || '<chirp>';
  7. return 'Hello from ' + this.name;
  8. }