Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Sep 22nd, 2012  |  syntax: None  |  size: 0.18 KB  |  hits: 25  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. var john = {
  2.   firstName: "John",
  3.   surname: "Smith"
  4. }
  5.  
  6. function func(a, b) {
  7.   alert( this[a] + ' ' + this[b] )
  8. }
  9.  
  10. func.call(john, 'firstName', 'surname')  // "John Smith"