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

October 2025

S M T W T F S
    1 23 4
5 678 9 1011
12 13 1415161718
19202122232425
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Oct. 16th, 2025 04:46 pm
Powered by Dreamwidth Studios