Jun. 18th, 2006

a quote

Jun. 18th, 2006 02:52 pm
juan_gandhi: (Default)
"We provide for each slave, in old age and in infancy, in sickness and in health, not according to his labor, but according to his wants... A southern farm is the beau ideal of Communism" (George Fitzhugh, Sociology for the South, 1854)

"Мы обеспечиваем каждого раба, в старости и в младенчестве, в болезни и в здоровье, не по труду, а по потребностям... Южная ферма - превосходный идеал Коммунизма".
juan_gandhi: (Default)
var x = new Object()
x.check = function() {
  print(this.tag);
}

x.f = function() {
  this.tag = "f called"
  this.check()
}

x.g = function() {
  this.tag = "g called"
  this.check()
}

x.t1 = function(cond) {
  this.tag = "guess what"
  cond ? this.f() : this.g()
}

x.t2 = function(cond) {
  this.tag = "mystery";
  var delegate = (cond ? this.f : this.g);
  delegate()
}


Now, what do you think will x.t2(1) print? :)

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

September 2025

S M T W T F S
 1 2345 6
78910111213
14151617181920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 8th, 2025 05:58 am
Powered by Dreamwidth Studios