Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 6th, 2012  |  syntax: JavaScript  |  size: 0.43 KB  |  views: 76  |  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. [23:12:02.035] function something_cool(text, callback){
  2.     alert(text);
  3.     if( callback instanceof Function ){ callback(); };
  4. }
  5. [23:12:02.039] undefined
  6. --
  7. [23:12:11.659] something_cool('Hi!')
  8. [23:12:14.307] undefined
  9. --
  10. [23:12:20.363] something_cool('Hi!', 123)
  11. [23:12:21.345] undefined
  12. --
  13. [23:12:32.549] something_cool('Hi!', function() { console.log(456); })
  14. [23:12:33.431] 456 @ Web Console:1
  15. [23:12:33.434] undefined